AtCoder Beginner Contest 030

はい。
https://beta.atcoder.jp/contests/abc030

A - 勝率計算

Python2

def gcd(a,b): return a if b==0 else gcd(b,a%b)
def lcm(a,b): return a*b/gcd(a,b)

a,b,c,d=map(int,raw_input().split())
b*=lcm(a,c)/a
d*=lcm(a,c)/c
ans=chk=0
print 'TAKAHASHI' if b>d else 'AOKI' if b<d else 'DRAW'

誤差が怖いので実数を使わないように。

B - 時計盤

Python2

n,m=map(int,raw_input().split())
n%=12
n=(30.0*n)+(m*0.5)
#n=(30.0*n)+(m/60*30.0)
m=m*6.0
print "%.10f"%min(abs(n-m),360-abs(n-m))

多分、実数使う必要がある。なんとなく計算する。

C - 飛行機乗り

Python3

n,m=map(int, input().split())
x,y=map(int, input().split())
a=[int(i) for i in input().split()]
b=[int(i) for i in input().split()]
a=a[::-1]
b=b[::-1]
 
ans=[0]*3
while 1:
    if ans[2]==0: t=a.pop()
    else: t=b.pop()
 
    if ans[2]==0 and t>=ans[1]:
        ans[1]=t+x
        ans[2]=1
    elif ans[2]==1 and t>=ans[1]:
        ans[1]=t+y
        ans[2]=0
        ans[0]+=1
    if (ans[2]==0 and len(a)==0) or (ans[2]==1 and len(b)==0):
        break
print(ans[0])

乗れるもの中では最も早い便を使って移動をシミュする。Bから出発できた回数が往復した回数になる。