s_id string | p_id string | u_id string | date string | language string | original_language string | filename_ext string | status string | cpu_time string | memory string | code_size string | code string | error string | stdout string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s900640077 | p00659 | u957028788 | 1502073437 | Python | Python3 | py | Runtime Error | 0 | 0 | 1010 | while True:
player_nun = int(input())
player_nun = 4
if player_nun == 0:
break
#?????????????????????
whole_data = []
for i in (0, player_nun):
dat = input().split()
p_data = []
p_data.append(dat[0])
for x in dat[1:]:
p_data.append(int(x))
whole_data.append(p_data)
#????????????????????????... | Traceback (most recent call last):
File "/tmp/tmp6785u4sg/tmpmh_c5b4x.py", line 2, in <module>
player_nun = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s268000803 | p00659 | u957028788 | 1502073734 | Python | Python3 | py | Runtime Error | 0 | 0 | 1031 | while True:
player_nun = int(input())
player_nun = 4
if player_nun == 0:
break
#?????????????????????
whole_data = []
for i in range(0, player_nun):
dat = input().split()
p_data = []
p_data.append(dat[0])
for x in dat[1:]:
p_data.append(int(x))
whole_data.append(p_data)
print(whole_data)
#???... | Traceback (most recent call last):
File "/tmp/tmpn9dx_xsx/tmp0s9e1jyi.py", line 2, in <module>
player_nun = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s059284963 | p00659 | u957028788 | 1502073781 | Python | Python3 | py | Runtime Error | 0 | 0 | 1031 | while True:
player_nun = int(input())
player_nun = 4
if player_nun == 0:
break
#?????????????????????
whole_data = []
for i in range(0, player_nun):
dat = input().split()
p_data = []
p_data.append(dat[0])
for x in dat[1:]:
p_data.append(int(x))
whole_data.append(p_data)
print(whole_data)
#???... | Traceback (most recent call last):
File "/tmp/tmpit9y8l94/tmp6dwoxep5.py", line 2, in <module>
player_nun = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s500271573 | p00661 | u546285759 | 1491192425 | Python | Python3 | py | Runtime Error | 0 | 0 | 212 | while True:
n, m = map(int, input().split())
if n == 0:
break
flag = 1
for i in range(m):
if int(input()) == 1:
flag = 0
print('{:.10f}'.format(n/2 if flag else 0)) | Traceback (most recent call last):
File "/tmp/tmp5lvm137u/tmp6gb5hyok.py", line 2, in <module>
n, m = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s129996966 | p00661 | u633068244 | 1399377642 | Python | Python | py | Runtime Error | 20 | 4240 | 232 | while 1:
n,m = map(int,raw_input().split())
if n == 0: break
p = map(int,raw_input().split())
sp = set()
for pi in p: sp |= set([pi*j for j in range(1,n/pi+1)])
print (n*(n+1)/2-sum(sp))*1.0/(n-len(sp)) if n-len(sp) > 0 else 0 | Traceback (most recent call last):
File "/tmp/tmpzj3u6_7s/tmptzhol2gv.py", line 2, in <module>
n,m = map(int,raw_input().split())
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s013616837 | p00661 | u633068244 | 1399379639 | Python | Python | py | Runtime Error | 10 | 4440 | 694 | import itertools
def prdct(array):
ref = 1
for a in array: ref *= a
return ref
while 1:
n,m = map(int,raw_input().split())
if n == 0: break
p = sorted(map(int,raw_input().split()))
if 1 in p:
print 0.0
continue
for i in range(len(p)-1,0,-1):
for j in range(i):
while 1:
if p[i] == p[j]:
del p[... | File "/tmp/tmp768cuatl/tmpqiccvp9l.py", line 12
print 0.0
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s592414572 | p00662 | u633068244 | 1399376434 | Python | Python | py | Runtime Error | 0 | 0 | 224 | while 1:
N = map(int,raw_input().split())
if sum(N) == 0: break
md,gg,go = N[0]+N[3],N[1]+N[4],N[2]+N[5]
mn = min(md,gg,go)
ans = 0
for i in range(max(0,w-2),w):
ans = max(ans,i+(md-i)/3+(gg-i)/3+(go-i)/3)
print ans | File "/tmp/tmpfm70z0_c/tmptws81mgx.py", line 9
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s111072805 | p00664 | u633068244 | 1400142073 | Python | Python | py | Runtime Error | 0 | 0 | 374 | while 1:
r,c,q = map(int,raw_input().split())
if r == 0: break
R = [[0,0] for i in range(r)]
C = [[0,0] for i in range(r)]
for i in range(1,q+1):
A,B,order = map(int,raw_input().split())
if A == 0:
R[B] = [i,order]
else:
C[B] = [i,order]
ans = 0
for ri in range(r):
ans += sum(R[ri][1] if R[ri][0] >... | File "/tmp/tmpevwy5jc6/tmp2zbozrln.py", line 15
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s905133307 | p00670 | u041086527 | 1416069287 | Python | Python | py | Runtime Error | 0 | 0 | 600 | import bisect
while True:
n,S = map(int, raw_input().split())
if n == 0 and S == 0:
break
r = [input() for i in range(n)]
ans = 0
r.sort()
for i in range(n):
tmp = S - r[i] + 1
if (tmp <= 0):
ans += n - 1
else:
d = r[0:i] + r[i + 1:]
... | File "/tmp/tmpvaxgq5f8/tmplyq2ivqm.py", line 23
print ans / 2
^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s323784507 | p00670 | u041086527 | 1416069315 | Python | Python | py | Runtime Error | 0 | 0 | 600 | import bisect
while True:
n,S = map(int, raw_input().split())
if n == 0 and S == 0:
break
r = [input() for i in range(n)]
ans = 0
r.sort()
for i in range(n):
tmp = S - r[i] + 1
if (tmp <= 0):
ans += n - 1
else:
d = r[0:i] + r[i + 1:]
... | File "/tmp/tmpdo8_qeg9/tmpc3az7tle.py", line 23
print ans / 2
^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s582049578 | p00670 | u041086527 | 1416069414 | Python | Python | py | Runtime Error | 0 | 0 | 586 | while True:
n,S = map(int, raw_input().split())
if n == 0 and S == 0:
break
r = [input() for i in range(n)]
ans = 0
r.sort()
for i in range(n):
tmp = S - r[i] + 1
if (tmp <= 0):
ans += n - 1
else:
d = r[0:i] + r[i + 1:]
left,rig... | File "/tmp/tmpj5phujg_/tmpsk0skkl2.py", line 22
print ans / 2
^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s375118333 | p00670 | u633068244 | 1399102157 | Python | Python | py | Runtime Error | 0 | 0 | 267 | R = 101
while 1:
n,S = map(int,raw_input().split())
if n == 0: break
r = [0]*R
for i in range(n):
r[int(raw_input())] += 1
ans = 0
for i in range(R):
if 2*i > S:
ans += r[i]*(r[i]-1)/2
ans += r[i]*sum([r[j] for j in range(max(i+1,S-j+1),R)])
print ans | File "/tmp/tmpojqh5vvs/tmp3oc882fe.py", line 13
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s625141861 | p00670 | u633068244 | 1399102416 | Python | Python | py | Runtime Error | 0 | 0 | 285 | R = 101
while 1:
n,S = map(int,raw_input().split())
if n == 0: break
d = [int(raw_input()) for i in range(n)]
r = [d.count(i) for i in set(d)]
ans = 0
for i in range(R):
if 2*i > S:
ans += r[i]*(r[i]-1)/2
ans += r[i]*sum([r[j] for j in range(max(i+1,S-i+1),R)])
print ans | File "/tmp/tmp02wko9pz/tmpeie5uyly.py", line 12
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s098731759 | p00677 | u827448139 | 1417437517 | Python | Python | py | Runtime Error | 0 | 0 | 449 | while True:
s,d,m=map(int,input().split())
ws,ps=[0]*s,[0]*s
for i in range(s):
k=int(input())
tmp=list(map(int,input().split()))
ws[i],ps[i]=tmp[0::2],tmp[1::2]
f=list(map(int,input().split()));
dp=[0]*(m+1)
for i in f:
for p,w in zip(ps[i],ws[i]):
for x in reversed(range(p,m+1)):
... | Traceback (most recent call last):
File "/tmp/tmpcj499lho/tmp8wpo9xft.py", line 2, in <module>
s,d,m=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s436439590 | p00682 | u296492699 | 1404745977 | Python | Python | py | Runtime Error | 0 | 0 | 343 | c=0
while True:
n=input()
if n==0:
break
c+=1
a0, b0=map(int,raw_input().split())
prev_a, prev_b=a, b
tmp=0
for i in range(n):
a, b=map(int,raw_input().split())
tmp+=(a-prev_a)**2+(b-prev_b)**2
prev_a, prev_b=a, b
tmp+=(prev_a-a0)**2+(prev_b-b0)**2
pri... | File "/tmp/tmpu6_iv66o/tmpgfl5uoz6.py", line 15
print c, tmp**0.5
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s103333148 | p00682 | u296492699 | 1404746028 | Python | Python | py | Runtime Error | 0 | 0 | 345 | c=0
while True:
n=input()
if n==0:
break
c+=1
a0, b0=map(int,raw_input().split())
prev_a, prev_b=a0, b0
tmp=0
for i in range(n):
a, b=map(int,raw_input().split())
tmp+=(a-prev_a)**2+(b-prev_b)**2
prev_a, prev_b=a, b
tmp+=(prev_a-a0)**2+(prev_b-b0)**2
p... | File "/tmp/tmp852x1csb/tmpbm6y1fbh.py", line 15
print c, tmp**0.5
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s805579221 | p00682 | u296492699 | 1404747151 | Python | Python | py | Runtime Error | 0 | 0 | 332 | c=0
while True:
n=input()
if n==0:
break
c+=1
x0, y0=map(int,raw_input().split())
prev_x, prev_y=x0, y0
tmp=0
for i in range(n):
x,y=map(int,raw_input().split())
tmp+=prev_x*y - prev_y*x
prev_x, prev_y=x, y
tmp+=prev_x*y0 - prev_y*x0
print c, 0.5*abs(t... | File "/tmp/tmp8fdolie_/tmp0l44zqvf.py", line 15
print c, 0.5*abs(tmp)
^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s306943555 | p00682 | u296492699 | 1404747301 | Python | Python | py | Runtime Error | 0 | 0 | 334 | c=0
while True:
n=input()
if n==0:
break
c+=1
x0, y0=map(int,raw_input().split())
prev_x, prev_y=x0, y0
tmp=0
for i in range(n-1):
x,y=map(int,raw_input().split())
tmp+=prev_x*y - prev_y*x
prev_x, prev_y=x, y
tmp+=prev_x*y0 - prev_y*x0
print c, 0.5*abs... | File "/tmp/tmpee94j3k1/tmpy52l7apk.py", line 15
print c, 0.5*abs(tmp)
^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s200677614 | p00682 | u296492699 | 1404747561 | Python | Python | py | Runtime Error | 0 | 0 | 346 | c=0
while True:
n=input()
if n==0:
break
c+=1
x0, y0=map(int,raw_input().split())
prev_x, prev_y=x0, y0
tmp=0
for i in range(n-1):
x,y=map(int,raw_input().split())
tmp+=prev_x*y - prev_y*x
prev_x, prev_y=x, y
tmp+=prev_x*y0 - prev_y*x0
print c, 0.5*abs... | File "/tmp/tmpuf9dsxcp/tmpogvvmz_y.py", line 15
print c, 0.5*abs(tmp)
^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s211074087 | p00682 | u296492699 | 1404747675 | Python | Python | py | Runtime Error | 0 | 0 | 351 | c=0
while True:
n=input()
if n==0:
break
c+=1
x0, y0=map(int,raw_input().split())
prev_x, prev_y=x0, y0
tmp=0
for i in range(n-1):
x,y=map(int,raw_input().split())
tmp+=prev_x*y - prev_y*x
prev_x, prev_y=x, y
tmp+=prev_x*y0 - prev_y*x0
print c, 0.5*abs... | File "/tmp/tmpgqk396y4/tmpkkxnrfnk.py", line 15
print c, 0.5*abs(tmp)
^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s569358249 | p00682 | u809815599 | 1472307657 | Python | Python3 | py | Runtime Error | 0 | 0 | 25 | import numpy
import scipy | ||
s890458354 | p00682 | u809815599 | 1472307775 | Python | Python3 | py | Runtime Error | 0 | 0 | 27 | import numpy
print("hello") | hello
| |
s172909969 | p00683 | u797673668 | 1488441672 | Python | Python3 | py | Runtime Error | 0 | 0 | 3178 | class TextEditor:
cur_w = 0
cur_c = 0
def __init__(self, txt):
self.words = txt.split(' ')
self.queries = {
'forward char': self.forward_char,
'forward word': self.forward_word,
'backward char': self.backward_char,
'backward word': self.backwa... | Traceback (most recent call last):
File "/tmp/tmps0zcr74u/tmp_bo6b412.py", line 99, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s481326348 | p00683 | u104911888 | 1373879857 | Python | Python | py | Runtime Error | 0 | 0 | 1115 | for i in range(input()):
s=raw_input()
cur=0
for j in range(input()):
temp=raw_input()
cmd,obj=temp.replace('"',"").split()
if cmd=="forward":
if obj=="char":
cur+=1
cur=min(cur,len(s))
else:
while cur<len(s):
... | File "/tmp/tmpmz8_7e88/tmp3tebnlvp.py", line 38
print s[:cur]+"^"+s[cur:]
^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s334709879 | p00683 | u104911888 | 1373881381 | Python | Python | py | Runtime Error | 0 | 0 | 1195 | for i in range(input()):
s=raw_input()
cur=0
for j in range(input()):
cmd=raw_input()
if cmd=="forward char":
cur=min(cur+1,len(s))
elif cmd=="forward word":
while cur<len(s) and s[cur]==" ":
cur+=1
while cur<len(s) and s[cur]!=" ":... | File "/tmp/tmpteqei0n_/tmpzew6sa5_.py", line 39
print s[:cur]+"^"+s[cur:]
^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s257534612 | p00683 | u104911888 | 1373881467 | Python | Python | py | Runtime Error | 0 | 0 | 1195 | for i in range(input()):
s=raw_input()
cur=0
for j in range(input()):
cmd=raw_input()
if cmd=="forward char":
cur=min(cur+1,len(s))
elif cmd=="forward word":
while cur<len(s) and s[cur]==" ":
cur+=1
while cur<len(s) and s[cur]!=" ":... | File "/tmp/tmp0uqam1ij/tmpofu966xb.py", line 39
print s[:cur]+"^"+s[cur:]
^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s283229828 | p00683 | u858885710 | 1397896774 | Python | Python | py | Runtime Error | 0 | 0 | 1252 | def operate( cmd, text, cur ):
lentxt = len(text)
if cmd == "forward char":
if cur < lentxt: cur += 1
elif cmd == "backward char":
if cur > 0: cur -= 1
elif cmd == "forward word":
while cur < lentxt and text[cur] == ' ': cur += 1
while cur < lentxt and text[cur] != ' ': c... | File "/tmp/tmppw8i8p12/tmp_wwd9cyt.py", line 18
if cur + d == lentxt: break
^^^^^
SyntaxError: 'break' outside loop
| |
s767324038 | p00684 | u858885710 | 1397990496 | Python | Python | py | Runtime Error | 0 | 0 | 983 | i = 1j
s = None
while True:
try:
s = raw_input()
except EOFError:
break
k, len_s, overflow = 0, len(s), False
while k < len_s:
while k < len_s and not s[k].isdigit(): k += 1
begin = k
while k < len_s and s[k].isdigit(): k += 1
end = k
if begin == l... | File "/tmp/tmpipx1u3cm/tmp1cv2e8kz.py", line 33
print res
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s140669451 | p00686 | u266872031 | 1385450326 | Python | Python | py | Runtime Error | 0 | 0 | 769 | import sys
checksize=0
place=[]
face=0 #N=0 E=1 S=2 W=3
X=0
Y=0
for l in sys.stdin:
line=l.split()
if checksize==0:
checksize=1
A=map(int,line)
X=A[0]
Y=A[1]
place=[1,1]
elif line[0]=="STOP":
checksize=0
elif line[0]=="LEFT":
face=(face-1)%4
... | ||
s311310134 | p00686 | u266872031 | 1385450468 | Python | Python | py | Runtime Error | 0 | 0 | 811 | import sys
checksize=0
place=[]
face=0 #N=0 E=1 S=2 W=3
X=0
Y=0
for l in sys.stdin:
line=l.split()
if checksize==0:
checksize=1
A=map(int,line)
X=A[0]
Y=A[1]
place=[1,1]
elif line[0]=="STOP":
checksize=0
print str(place[0])+" "+str(place[1])
elif ... | File "/tmp/tmpyt7mz5hi/tmpqf5h3zks.py", line 18
print str(place[0])+" "+str(place[1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s799492286 | p00686 | u266872031 | 1385465547 | Python | Python | py | Runtime Error | 0 | 0 | 811 | import sys
checksize=0
place=[]
face=0 #N=0 E=1 S=2 W=3
X=0
Y=0
for l in sys.stdin:
line=l.split()
if checksize==0:
checksize=1
A=map(int,line)
X=A[0]
Y=A[1]
place=[1,1]
elif line[0]=="STOP":
checksize=0
print str(place[0])+" "+str(place[1])
elif ... | File "/tmp/tmpzbrqpbil/tmp3xticzke.py", line 18
print str(place[0])+" "+str(place[1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s982364121 | p00686 | u266872031 | 1385566719 | Python | Python | py | Runtime Error | 0 | 0 | 846 | import sys
checksize=0
place=[]
face=0 #N=0 E=1 S=2 W=3
X=0
Y=0
for l in sys.stdin:
line=l.split()
if line[0]==0:
break
elif checksize==0:
checksize=1
A=map(int,line)
X=A[0]
Y=A[1]
place=[1,1]
elif line[0]=="STOP":
checksize=0
print str(pl... | File "/tmp/tmp65wwvkxo/tmp_7gghsfh.py", line 20
print str(place[0])+" "+str(place[1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s487108356 | p00687 | u847467233 | 1531529587 | Python | Python3 | py | Runtime Error | 0 | 0 | 218 | # AOJ 1105: Unable Count
# Python3 2018.7.14 bal4u
while True:
n, a, b = map(int, input().split())
if n == 0: break
f = [0]*(n+1)
for x in range(0, n, a):
for y in range(0, n+1, b): f[x+y] = 1
print(n-sum(f))
| Traceback (most recent call last):
File "/tmp/tmp2wpnyrcl/tmp3x4y6rnr.py", line 5, in <module>
n, a, b = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s262371115 | p00687 | u847467233 | 1531529828 | Python | Python3 | py | Runtime Error | 0 | 0 | 225 | # AOJ 1105: Unable Count
# Python3 2018.7.14 bal4u
while True:
n, a, b = map(int, input().split())
if n == 0: break
f = [0]*(n>>1)
for x in range(0, n, a):
for y in range(0, n+1, b): f[x+y] = 1
print(n-sum(f[1:n+1]))
| Traceback (most recent call last):
File "/tmp/tmppu06gksj/tmpdbiepubt.py", line 5, in <module>
n, a, b = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s060796466 | p00687 | u633068244 | 1400321585 | Python | Python | py | Runtime Error | 0 | 0 | 215 | while 1:
n,a,b = map(int,raw_input().split())
if n == 0: break
dp = [0]*(n+1)
dp[a] = dp[b] = 1
for i in range(n+1):
if dp[i] == 1:
if i+a < n+1: dp[i+a] = 1
if i+b < n+1: dp[i+b] = 1
print n - sum(dp) | File "/tmp/tmp5305b79l/tmpk8w71a3z.py", line 10
print n - sum(dp)
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s351385448 | p00687 | u633068244 | 1400322123 | Python | Python | py | Runtime Error | 0 | 0 | 201 | while 1:
n,a,b = map(int,raw_input().split())
if n == 0: break
dp = [0]*(max(n,a,b)+1)
dp[a] = dp[b] = 1
for i in range(n+1-min(a,b)):
if dp[i]:
dp[i+a] = dp[i+b] = 1
print n - sum(dp[:n+1]) | File "/tmp/tmpou6vzw0w/tmpbcm4b3lc.py", line 9
print n - sum(dp[:n+1])
^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s949290515 | p00688 | u797673668 | 1490618463 | Python | Python3 | py | Runtime Error | 0 | 0 | 406 | from math import gcd
while True:
a, b, c = map(int, input().split())
if not a:
break
d = (b ** 2 - 4 * a * c) ** 0.5
if isinstance(d, complex) or d - int(d) > 1e-6:
print('Impossible')
continue
num1, num2 = -b + int(d), -b - int(d)
den = 2 * a
cmn1, cmn2 = gcd(num1, ... | Traceback (most recent call last):
File "/tmp/tmppxpeg3ox/tmpzuvrv3f9.py", line 4, in <module>
a, b, c = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s487984757 | p00691 | u633068244 | 1396535165 | Python | Python | py | Runtime Error | 0 | 0 | 147 | while 1:
n=input()**3
if n==0:break
mn=n
for i in range(1,n):
for j in range(i,n):
m=n-i**3-j**3
if m<0:break
if m<mn:mn=m
print mn | File "/tmp/tmpw2gnebby/tmpkdi8he7n.py", line 10
print mn
^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s021356063 | p00691 | u633068244 | 1396536850 | Python | Python | py | Runtime Error | 0 | 0 | 150 | while 1:
z3=m=input()**3
if z3==0:break
x=0
while 1:
x+=1
x3=x**3
y=int((n3-i3)**(1/3.))
if y<x:break
n=z3-x3-y**3
if n<m:m=n
print m | File "/tmp/tmpb7b9srvq/tmp3abnmtxe.py", line 12
print m
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s714311728 | p00693 | u633068244 | 1400154015 | Python | Python | py | Runtime Error | 0 | 0 | 374 | import re
while 1:
n,m = map(int,raw_input().split())
P = []; D = []
for i in range(n):
p,s,d = raw_input().replace("?","[0-9]").split()
r = re.compile(s+d)
if p[0] == "p":
P.append(r)
else:
D.append(r)
for i in range(m):
s,d,name = raw_input().split()
tf = any(r.search(s+d) for r in P) and not an... | File "/tmp/tmpdc3l1ef5/tmp7noyz9zm.py", line 16
print s,d,name
^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s112134907 | p00698 | u647766105 | 1427981247 | Python | Python | py | Runtime Error | 0 | 0 | 1337 | from copy import deepcopy
answer = ""
while True:
line = raw_input()
while line.isspace() or not line: #!?!?!!!
line = raw_input()
if line == "0":
break
P, S = map(int, line.split())
def check(data):
return reduce(lambda a, b: a+b, data).count("?")
def calc(seq):
... | File "/tmp/tmpawz9wwcp/tmpbtp0ztkv.py", line 42
print answer.strip("\n")
^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s511165798 | p00705 | u046108504 | 1555867190 | Python | Python3 | py | Runtime Error | 0 | 0 | 368 | import collections
while True:
N, Q = map(int, input().split())
if N == 0 and Q == 0:
break
D = []
for _ in range(N):
i = list(map(int, input().split()))
del i[0]
[D.append(ii) for ii in i]
c = collections.Counter(D)
cc = c.most_common()
if cc[0][1] >= Q:
... | Traceback (most recent call last):
File "/tmp/tmpob8ebqs3/tmpslnne3ds.py", line 4, in <module>
N, Q = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s248635401 | p00705 | u546285759 | 1486804682 | Python | Python3 | py | Runtime Error | 0 | 0 | 383 | from collections import Counter
while 1:
N,Q=map(int,input().split())
if N==0: break
M,l=[list(map(int,input().split())) for _ in range(N)],[]
for mm in M:
if len(mm)!=1:
for i in range(1,len(mm)):
l.append(mm[i])
c=Counter(l)
_,mv=c.most_common(1)[0]
prin... | Traceback (most recent call last):
File "/tmp/tmp3mlqjtdl/tmpodb8v68x.py", line 3, in <module>
N,Q=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s161863883 | p00705 | u546285759 | 1486804779 | Python | Python3 | py | Runtime Error | 0 | 0 | 383 | from collections import Counter
while 1:
N,Q=map(int,input().split())
if N==0: break
M,l=[list(map(int,input().split())) for _ in range(N)],[]
for mm in M:
if len(mm)!=1:
for i in range(1,len(mm)):
l.append(mm[i])
c=Counter(l)
_,mv=c.most_common(1)[0]
prin... | Traceback (most recent call last):
File "/tmp/tmpcgumpl92/tmpec84hd9q.py", line 3, in <module>
N,Q=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s572096381 | p00705 | u546285759 | 1486804820 | Python | Python3 | py | Runtime Error | 0 | 0 | 391 | from collections import Counter
while 1:
N,Q=map(int,input().split())
if (N,Q)==(0,0): break
M,l=[list(map(int,input().split())) for _ in range(N)],[]
for mm in M:
if len(mm)!=1:
for i in range(1,len(mm)):
l.append(mm[i])
c=Counter(l)
_,mv=c.most_common(1)[0]
... | Traceback (most recent call last):
File "/tmp/tmpek1inhh9/tmpeo123yrx.py", line 3, in <module>
N,Q=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s513648608 | p00705 | u546285759 | 1486804870 | Python | Python3 | py | Runtime Error | 0 | 0 | 398 | from collections import Counter
while 1:
N,Q=map(int,input().split())
if (N,Q)==(0,0): break
M,l=[list(map(int,input().split())) for _ in range(N)],[]
for mm in M:
if len(mm)!=1:
for i in range(1,len(mm)):
l.append(mm[i])
c=Counter(l)
_,mv=c.most_common(1)[0]
... | Traceback (most recent call last):
File "/tmp/tmp75mu9e_h/tmpudyksq6s.py", line 3, in <module>
N,Q=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s453051750 | p00705 | u146816547 | 1524749303 | Python | Python | py | Runtime Error | 0 | 0 | 364 | while True:
N, Q = map(int, raw_input().split())
if N == 0 and Q == 0:
break
t = [map(int, raw_input().split())[1:] for _ in range(N)]
table = [[i, 0] for i in range(10)]
for i in t:
for j in i:
table[j][1] += 1
table.sort(reverse=True, key=lambda x: x[1])
pr... | File "/tmp/tmpg2yr8tff/tmp9ths1rny.py", line 16
print table[0][0] if table[0][1] >= Q else 0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s038284954 | p00705 | u109084363 | 1359198933 | Python | Python | py | Runtime Error | 0 | 0 | 610 | import sys
import collections
while True:
N, Q = map(int, sys.stdin.readline().split())
if N == 0:
break
counter = collections.Counter()
for i in xrange(N):
date = map(int, sys.stdin.readline().split())
if date[0] != 0:
counter.update(date[1:])
result = coun... | File "/tmp/tmpcddwg8w2/tmpw72ah3df.py", line 19
print 0
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s197974344 | p00705 | u104911888 | 1369792443 | Python | Python | py | Runtime Error | 0 | 0 | 236 | while True:
N,Q=map(int,raw_input().split())
if N==Q==0:break
T=[0]*51
for i in range(N):
L=map(int,raw_input().split())
for j in L[1:]:
T[j]+=1
m=max(T)
print 0 if m<Q else T.index(m) | File "/tmp/tmpyrpulleu/tmpbm9eaoy_.py", line 10
print 0 if m<Q else T.index(m)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s592788340 | p00706 | u798803522 | 1468421119 | Python | Python3 | py | Runtime Error | 0 | 0 | 929 | trial = int(input())
while True:
area = [int(n) for n in input().split(" ")]
trees = []
for t in range(trial):
trees.append(int(n) for n in input().split(" "))
cnt,answer = 0,0
trees = sorted(trees,key=lambda x:(x[0],x[1]))
building = [int(n) for n in input().split(" ")]
for x in ran... | Traceback (most recent call last):
File "/tmp/tmpqmcwf5sg/tmpcznxnriq.py", line 1, in <module>
trial = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s533947681 | p00706 | u798803522 | 1468423334 | Python | Python3 | py | Runtime Error | 0 | 0 | 1186 | with open("input1(1).txt") as files:
trial = int(files.readline())
while True:
area = [int(n) for n in files.readline().split(" ")]
trees = []
for t in range(trial):
trees.append([int(n) for n in files.readline().split(" ")])
cnt,answer = 0,0
trees = sorted(tr... | Traceback (most recent call last):
File "/tmp/tmpp_96tli7/tmp_lli_rze.py", line 1, in <module>
with open("input1(1).txt") as files:
^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'input1(1).txt'
| |
s190017676 | p00706 | u506554532 | 1512979486 | Python | Python3 | py | Runtime Error | 0 | 0 | 637 | while True:
N = int(input())
if N == 0: break
W,H = map(int,input().split())
fld = [[0 for w in range(W)] for h in range(H)]
for i in range(N):
x,y = map(lambda s:int(s)-1,raw_input().split())
fld[y][x] = 1
cums = [[0 for w in range(W+1)] for h in range(H+1)]
for y in range(H... | Traceback (most recent call last):
File "/tmp/tmpfapnx8ra/tmpexebd12e.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s154983868 | p00706 | u506554532 | 1512979560 | Python | Python3 | py | Runtime Error | 0 | 0 | 637 | while True:
N = int(input())
if N == 0: break
W,H = map(int,input().split())
fld = [[0 for w in range(W)] for h in range(H)]
for i in range(N):
x,y = map(lambda s:int(s)-1,raw_input().split())
fld[y][x] = 1
cums = [[0 for w in range(W+1)] for h in range(H+1)]
for y in range(H... | Traceback (most recent call last):
File "/tmp/tmp3bvc36on/tmpd8oil58m.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s941015625 | p00708 | u633068244 | 1400158920 | Python | Python | py | Runtime Error | 0 | 0 | 599 | def R(xyrz,xyrz1):
x, y, z, r = xyrz
x1,y1,z1,r1 = xyrz1
return max(0,((x-x1)**2 + (y-y1)**2 + (z-z1)**2)**0.5 - r - r1)
while 1:
n = input()
if n == 0: break
xyzr = [map(float,raw_input().split()) for i in range(n)]
ans = 1e12
for i in range(n):
for j in range(i+1,n):
l = R(xyzr[i],xyzr[j])
if l < an... | File "/tmp/tmp4dfrz358/tmpyanbzdkv.py", line 28
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s817911233 | p00708 | u633068244 | 1400159008 | Python | Python | py | Runtime Error | 0 | 0 | 585 | def R(xyrz,xyrz1):
x, y, z, r = xyrz
x1,y1,z1,r1 = xyrz1
return max(0,((x-x1)**2 + (y-y1)**2 + (z-z1)**2)**0.5 - r - r1)
while 1:
n = input()
if n == 0: break
xyzr = [map(float,raw_input().split()) for i in range(n)]
ml = 1e12
for i in range(n):
for j in range(i+1,n):
l = R(xyzr[i],xyzr[j])
if l < ml:... | File "/tmp/tmpu4tua__6/tmpmftzqlvn.py", line 29
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s774901935 | p00708 | u633068244 | 1400159056 | Python | Python | py | Runtime Error | 0 | 0 | 603 | def R(xyrz,xyrz1):
x, y, z, r = xyrz
x1,y1,z1,r1 = xyrz1
return max(0,((x-x1)**2 + (y-y1)**2 + (z-z1)**2)**0.5 - r - r1)
while 1:
n = input()
if n == 0: break
xyzr = [map(float,raw_input().split()) for i in range(n)]
ans = 1e12
for i in range(n):
for j in range(i+1,n):
l = 1#R(xyzr[i],xyzr[j])
if l < ... | File "/tmp/tmp985ntnez/tmpm_8d360e.py", line 28
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s910356741 | p00708 | u633068244 | 1400159213 | Python | Python | py | Runtime Error | 0 | 0 | 605 | def R(xyzr1,xyzr2):
x1,y1,z1,r1 = xyzr1
x2,y2,z2,r2 = xyzr2
return max(0,((x1-x2)**2 + (y1-y2)**2 + (z1-z2)**2)**0.5 - r1 - r2)
while 1:
n = input()
if n == 0: break
xyzr = [map(float,raw_input().split()) for i in range(n)]
ans = 1e10
for i in range(n):
for j in range(i+1,n):
l = R(xyzr[i],xyzr[j])
if ... | File "/tmp/tmp1wkzimll/tmpj3n8vrbu.py", line 28
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s039742867 | p00708 | u633068244 | 1400159370 | Python | Python | py | Runtime Error | 0 | 0 | 605 | def R(xyzr1,xyzr2):
x1,y1,z1,r1 = xyzr1
x2,y2,z2,r2 = xyzr2
return max(0,((x1-x2)**2 + (y1-y2)**2 + (z1-z2)**2)**0.5 - r1 - r2)
while 1:
n = input()
if n == 0: break
xyzr = [map(float,raw_input().split()) for i in range(n)]
ans = 1e10
for i in range(n):
for j in range(i+1,n):
l = R(xyzr[i],xyzr[j])
if ... | File "/tmp/tmpirey195c/tmpznfm_5bb.py", line 28
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s626351376 | p00708 | u633068244 | 1400159414 | Python | Python | py | Runtime Error | 0 | 0 | 583 | def R(xyzr1,xyzr2):
x1,y1,z1,r1 = xyzr1
x2,y2,z2,r2 = xyzr2
return max(0,((x1-x2)**2 + (y1-y2)**2 + (z1-z2)**2)**0.5 - r1 - r2)
while 1:
n = input()
if n == 0: break
xyzr = [map(float,raw_input().split()) for i in range(n)]
ans = 1e10
for i in range(n):
for j in range(i+1,n):
l = R(xyzr[i],xyzr[j])
if ... | File "/tmp/tmpa1pz2hlr/tmp_gj1zl21.py", line 28
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s364294754 | p00708 | u633068244 | 1400159723 | Python | Python | py | Runtime Error | 0 | 0 | 639 | def R(xyzr1,xyzr2):
x1,y1,z1,r1 = xyzr1
x2,y2,z2,r2 = xyzr2
return max(0,((x1-x2)**2 + (y1-y2)**2 + (z1-z2)**2)**0.5 - r1 - r2)
while 1:
n = input()
if n == 0: break
if n == 1:
print 0.0
continue
xyzr = [map(float,raw_input().split()) for i in range(n)]
ans = 1e10
for i in range(n):
for j in range(i+1,n)... | File "/tmp/tmpsyd8s5cb/tmpoz6o33ak.py", line 9
print 0.0
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s361047229 | p00710 | u966364923 | 1419218331 | Python | Python3 | py | Runtime Error | 0 | 0 | 289 | while True:
(n, r) = [int(x) for x in input().split()]
if n==0 and r==0:
exit()
cards = [n-i for i in range(n)]
for _ in range(r):
(p, c) = [int(x) for x in input().split()]
cards = cards[p-1:c] + cards[p-1:p-1+c] + cards[p-1+c:]
print(cards[0]) | Traceback (most recent call last):
File "/tmp/tmp5cepzmuw/tmprs7u5bsy.py", line 2, in <module>
(n, r) = [int(x) for x in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s721509319 | p00710 | u998188826 | 1441280809 | Python | Python | py | Runtime Error | 0 | 0 | 255 |
while True:
n, r = map(int, input().split())
if (n, r) == (0, 0):
break
cards = list(range(1, n+1))[::-1]
print(cards)
for i in range(r):
p, c = map(int, input().split())
cards = cards[p-1:p-1+c] + cards[:p-1] + cards[p-1+c:]
print(cards[0]) | Traceback (most recent call last):
File "/tmp/tmpvabq038k/tmp02zce80l.py", line 3, in <module>
n, r = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s935510928 | p00710 | u488601719 | 1451131882 | Python | Python | py | Runtime Error | 0 | 0 | 359 | while True:
n, r = map(int, input().split())
if n == 0 and r == 0:
break
l = []
for i in range(1, n + 1):
l.append(i)
for i in range(0, r):
p, c = map(int, input().split())
tmp = l[len(l) - p + 1:len(l)]
del l[len(l) - p + 1:len(l)]
l[len(l) - c:len(... | Traceback (most recent call last):
File "/tmp/tmpa3ifeows/tmpbcs3uq9t.py", line 2, in <module>
n, r = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s228883470 | p00710 | u616098312 | 1466500361 | Python | Python3 | py | Runtime Error | 0 | 0 | 311 | x=0
while True:
sousa=input().sprit() #?????????
sousa=[int(sousa[0]),int(sousa[1])]
if sousa==[0,0]:break
yama=[]
for k in range(sousa[1]):yama.append(k+1)
yama=yama[::-1]
for r in range(sousa[1]):
[p,c]=input().sprit()
[p,c]=[int(p),int(c)]
yama[:p+c-1]=yama[p-1:p+c-1]+yama[:p-2]
print(yama[0]) | Traceback (most recent call last):
File "/tmp/tmp_8na162c/tmppbon7gxc.py", line 3, in <module>
sousa=input().sprit() #?????????
^^^^^^^
EOFError: EOF when reading a line
| |
s474932279 | p00710 | u616098312 | 1466500498 | Python | Python3 | py | Runtime Error | 0 | 0 | 307 | while True:
sousa=input().sprit() #?????????
sousa=[int(sousa[0]),int(sousa[1])]
if sousa==[0,0]:break
yama=[]
for k in range(sousa[0]):yama.append(k+1)
yama=yama[::-1]
for r in range(sousa[1]):
[p,c]=input().sprit()
[p,c]=[int(p),int(c)]
yama[:p+c-1]=yama[p-1:p+c-1]+yama[:p-2]
print(yama[0]) | Traceback (most recent call last):
File "/tmp/tmp9sdircfm/tmp8i_pnxg3.py", line 2, in <module>
sousa=input().sprit() #?????????
^^^^^^^
EOFError: EOF when reading a line
| |
s910262628 | p00710 | u653710476 | 1466502177 | Python | Python3 | py | Runtime Error | 0 | 0 | 366 | first = input().split()
n = int(first[0])
r = int(first[1])
while n != 0 or r != 0:
i = 0
card = list(range(n))
while i < r:
sh = input().split()
p, c = list(map(int,sh))
card = card[p-1:p+c-2:] + card[0:p-2:] + card[p+c-1:n:]
i = i + 1
print(n - int(card[0]))
next = ... | Traceback (most recent call last):
File "/tmp/tmp7mhu4n6x/tmph15zyqvj.py", line 1, in <module>
first = input().split()
^^^^^^^
EOFError: EOF when reading a line
| |
s149680011 | p00710 | u798803522 | 1468136132 | Python | Python3 | py | Runtime Error | 0 | 0 | 543 | cond = [int(n) for n in input().split(" ")]
while True:
case = []
cards = [n for n in range(1,cond[0] + 1)]
for c in range(cond[1]):
case = ([int(n) for n in input().split(" ")]
disp = cards[case[0]:case[0]+case[1]]
cards[case[0]:case[0]+case[1]] = cards[case[0]-case[1]:case[0]]
... | File "/tmp/tmpll8kvhhk/tmpd4k_gi0g.py", line 7
case = ([int(n) for n in input().split(" ")]
^
SyntaxError: '(' was never closed
| |
s816116747 | p00710 | u798803522 | 1468136181 | Python | Python3 | py | Runtime Error | 0 | 0 | 542 | cond = [int(n) for n in input().split(" ")]
while True:
case = []
cards = [n for n in range(1,cond[0] + 1)]
for c in range(cond[1]):
case = [int(n) for n in input().split(" ")]
disp = cards[case[0]:case[0]+case[1]]
cards[case[0]:case[0]+case[1]] = cards[case[0]-case[1]:case[0]]
... | Traceback (most recent call last):
File "/tmp/tmp68ta3sng/tmpffx147qj.py", line 1, in <module>
cond = [int(n) for n in input().split(" ")]
^^^^^^^
EOFError: EOF when reading a line
| |
s338045982 | p00710 | u963883732 | 1518517357 | Python | Python3 | py | Runtime Error | 0 | 0 | 366 | l = input()
L = l.split()
for i in range(len(L)):
L[i] = int(L[i])
while True:
if L[0] == 0:
break
a = [L[0]-number for number in range(L[0])]
for j in range(L[1]):
r = input()
R = r.split()
for k in range(len(R)):
R[k] = int(R[k])
b = []
b += a[R[0]-1:R[0]+R[1]-1]
b += a[:R[0]-1]
b += a[R[0]+R[1... | Traceback (most recent call last):
File "/tmp/tmpi7339nzb/tmp752jzvpy.py", line 1, in <module>
l = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s653586413 | p00710 | u500292616 | 1530624332 | Python | Python3 | py | Runtime Error | 0 | 0 | 379 | n=1
r=1
while n !=0 and r!=0:
n,r=input().split()
n,r=int(n),int(r)
card= [[int(i) for i in input().split()] for i in range(r)]
yama= list(range(n,0,-1))
for i in range(r):
p=card[i][0]
c=card[i][1]
x=yama[:p-1]
y=yama[p-1:p-1+c]
z=yama[p-1+c:]
... | Traceback (most recent call last):
File "/tmp/tmpn57l4oiw/tmpud7od0oq.py", line 4, in <module>
n,r=input().split()
^^^^^^^
EOFError: EOF when reading a line
| |
s641538142 | p00711 | u124909914 | 1426121130 | Python | Python3 | py | Runtime Error | 0 | 0 | 501 | def search(x, y, m):
if x >= len(m[0]) or y >= len(m):
return 0
if m[y][x] == '#':
return 0
m[y][x] = '#'
return 1 + search(x+1,y, m) + search(x-1,y,m) \
+ search(x,y+1,m) + search(x,y-1,m)
while True:
w, h = map(int, input().split())
if w == 0: break
room = []
... | Traceback (most recent call last):
File "/tmp/tmp_jz_htmt/tmp7q_f6dkd.py", line 11, in <module>
w, h = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s464988959 | p00711 | u966364923 | 1427445776 | Python | Python3 | py | Runtime Error | 0 | 0 | 1211 | while True:
W,H = [int(x) for x in input().split()]
if W==0 and H==0:
exit()
tiles = []
X = 0
Y = 0
for i in range(H):
tiles.append(input())
if '@' in tiles[i]:
Y = i
X = tiles[i].index('@')
d = [[9999 for j in range(H*W)] for i in range(H*W)]
... | Traceback (most recent call last):
File "/tmp/tmp0bsochbj/tmpm7_i2_pr.py", line 2, in <module>
W,H = [int(x) for x in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s747321407 | p00711 | u667806071 | 1464097275 | Python | Python | py | Runtime Error | 0 | 0 | 812 | re = open("input")
count = 0
role = {".": True, "@": False, "#": False}
def now(xpoint, ypoint):
return role[room[ypoint][xpoint]]
def search(xpoint, ypoint):
global count
if 0 <= xpoint < wh[0] and 0 <= ypoint < wh[1] and now(xpoint, ypoint):
count += 1
room[ypoint][xpoint] = "@"
s... | File "/tmp/tmp4n9aclb2/tmpt9l_f0gx.py", line 30
print count
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s387907789 | p00711 | u798803522 | 1469203070 | Python | Python3 | py | Runtime Error | 0 | 0 | 848 | def getter(targ,x,y):
#print(x,y,len(targ[0]),len(targ))
if 0 > x or x >= len(targ) or 0 > y or y >= len(targ[0]) or targ[x][y] == '#':
return 0
else:
targ[x][y] = '#'
return 1 + getter(targ,x+1,y) + getter(targ,x-1,y) + getter(targ,x,y+1) + getter(targ,x,y-1)
with open("input1.txt")... | Traceback (most recent call last):
File "/tmp/tmp9b70iltl/tmply1ejneu.py", line 8, in <module>
with open("input1.txt") as f:
^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'input1.txt'
| |
s027978566 | p00711 | u358919705 | 1481546272 | Python | Python3 | py | Runtime Error | 0 | 0 | 664 | data, res
def valid(x, y):
global data
return 0 <= x < W and 0 <= y < H and data[y][x] != '#'
def dfs(x, y):
global data, res
if valid(x, y):
res += 1
data[y][x] = '#'
dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]
for i in range(4):
dfs(x + dx[i], y + dy[i])... | File "/tmp/tmpblbzjy80/tmp_pj2hzab.py", line 20
global data, res
^^^^^^^^^^^^^^^^
SyntaxError: name 'data' is used prior to global declaration
| |
s533503240 | p00711 | u358919705 | 1481546434 | Python | Python3 | py | Runtime Error | 0 | 0 | 652 | data, res
def valid(x, y):
global data
return 0 <= x < W and 0 <= y < H and data[y][x] != '#'
def dfs(x, y):
global data, res
if valid(x, y):
res += 1
data[y][x] = '#'
dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]
for i in range(4):
dfs(x + dx[i], y + dy[i])... | File "/tmp/tmp018j44n2/tmp59q7yiho.py", line 20
global data, res
^^^^^^^^^^^^^^^^
SyntaxError: name 'data' is used prior to global declaration
| |
s297098570 | p00711 | u358919705 | 1481546533 | Python | Python3 | py | Runtime Error | 0 | 0 | 660 | data, res = [], 0
def valid(x, y):
global data
return 0 <= x < W and 0 <= y < H and data[y][x] != '#'
def dfs(x, y):
global data, res
if valid(x, y):
res += 1
data[y][x] = '#'
dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]
for i in range(4):
dfs(x + dx[i], y ... | File "/tmp/tmppne7gk08/tmph0jxtn8d.py", line 20
global data, res
^^^^^^^^^^^^^^^^
SyntaxError: name 'data' is assigned to before global declaration
| |
s291409473 | p00711 | u635391238 | 1508564227 | Python | Python3 | py | Runtime Error | 0 | 0 | 1806 |
def depth_first_search(x, y):
"""
??±???????????¢?´¢?????????
:param x: ?????¨??°????¨?
:param y: ?????¨??°??????
:return: ?????°
"""
# ????????????????????§?¢??????????
# ??????x ,y+1
# ??????x+1,y
# ??????x ,y-1
# ??????x-1,y
move_list = [[0,1],[1,0],[0,-1],[-1,0]]
... | Traceback (most recent call last):
File "/tmp/tmpk8dn836_/tmp_oy0vd1c.py", line 49, in <module>
tile_size = input('').split(' ')
^^^^^^^^^
EOFError: EOF when reading a line
| |
s900394523 | p00711 | u228488524 | 1508828744 | Python | Python3 | py | Runtime Error | 0 | 0 | 724 | def search(M, l, walkable):
i, j = (l.pop(0))
nexts = []
if i !=0:
nexts.append((i-1, j))
if i != len(M)-1:
nexts.append((i+1, j))
if j != 0:
nexts.append((i, j-1))
if j != len(M[0])-1:
nexts.append((i, j+1))
for nex in nexts:
x, y = nex
if M[... | File "/tmp/tmpuuyfgz7f/tmpo_5ullea.py", line 20
while '0 0' != (inp = input()):
^^^^^^^^^^^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s556463444 | p00711 | u228488524 | 1508829211 | Python | Python3 | py | Runtime Error | 0 | 0 | 723 | def search(M, l, walkable):
i, j = (l.pop(0))
nexts = []
if i !=0:
nexts.append((i-1, j))
if i != len(M)-1:
nexts.append((i+1, j))
if j != 0:
nexts.append((i, j-1))
if j != len(M[0])-1:
nexts.append((i, j+1))
for nex in nexts:
x, y = nex
if M[... | File "/tmp/tmpjoc37ttu/tmp737wrbsc.py", line 20
while '0 0' != (inp = input()):
^^^^^^^^^^^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s562147048 | p00711 | u228488524 | 1509429944 | Python | Python3 | py | Runtime Error | 0 | 0 | 729 | import queue
def solve(w, h):
q = queue.Queue()
m = [['#' for i in range(w+2)] for j in range(h+2)]
for i in range(h):
inp = input()
for j in range(w):
m[i+1][j+1] = inp[j]
if m[i+1][j+1] == '@':
start = [i+1,j+1]
q.put(start)
c = 1
while ... | File "/tmp/tmpy85idfnw/tmphvdf1_kf.py", line 30
print solve(w,h)
^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s722581822 | p00711 | u228488524 | 1512972253 | Python | Python3 | py | Runtime Error | 0 | 0 | 723 | def search(M, l, walkable):
i, j = (l.pop(0))
nexts = []
if i !=0:
nexts.append((i-1, j))
if i != len(M)-1:
nexts.append((i+1, j))
if j != 0:
nexts.append((i, j-1))
if j != len(M[0])-1:
nexts.append((i, j+1))
for nex in nexts:
x, y = nex
if M[... | File "/tmp/tmpfd9lcv1m/tmp4nff2p4w.py", line 20
while '0 0' != (inp = input()):
^^^^^^^^^^^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s517947745 | p00711 | u228488524 | 1512972667 | Python | Python3 | py | Runtime Error | 0 | 0 | 725 | def search(M, l, walkable):
i, j = (l.pop(0))
nexts = []
if i !=0:
nexts.append((i-1, j))
if i != len(M)-1:
nexts.append((i+1, j))
if j != 0:
nexts.append((i, j-1))
if j != len(M[0])-1:
nexts.append((i, j+1))
for nex in nexts:
x, y = nex
if M[... | File "/tmp/tmpi_hecgul/tmpvfr0rx9d.py", line 20
while '0 0' != (inp = input()):
^^^^^^^^^^^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s368225366 | p00711 | u228488524 | 1512974039 | Python | Python3 | py | Runtime Error | 0 | 0 | 734 | def search(M, l, walkable):
i, j = (l.pop(0))
nexts = []
if i !=0:
nexts.append((i-1, j))
if i != len(M)-1:
nexts.append((i+1, j))
if j != 0:
nexts.append((i, j-1))
if j != len(M[0])-1:
nexts.append((i, j+1))
for nex in nexts:
x, y = nex
if M[... | File "/tmp/tmpl72x7h88/tmp2mrjtxk9.py", line 20
while '0 0' != (inp = input().rstrip()):
^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s901870521 | p00711 | u209989098 | 1529216678 | Python | Python3 | py | Runtime Error | 0 | 0 | 459 | while 1:
x,y = list(map(int,input()split()))
if x == 0:
break
pp = [1,-1,0,0]
qq = [0,0,1,-1]
m = []
for i in range(y):
m.append(list(input()))
if '@' in m[-1]:
ss = m[-1].index('@')
tt = i
cnt = 0
def move (cx,cy):
global cnt
if cy >= y or cy < 0 or cx >= x or cx < 0:
return
if m[cy][cx]... | File "/tmp/tmpz370c_yj/tmpyc4fsb6b.py", line 2
x,y = list(map(int,input()split()))
^^^^^^^^^^^^^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?
| |
s896409084 | p00711 | u209989098 | 1529216711 | Python | Python3 | py | Runtime Error | 0 | 0 | 461 | while 1:
x,y = list(map(int,input()split()))
if x == 0:
break
pp = [1,-1,0,0]
qq = [0,0,1,-1]
m = []
for i in range(y):
m.append(list(input()))
if '@' in m[-1]:
ss = m[-1].index('@')
tt = i
cnt = 0
def move (cx,cy):
global cnt
if cy >= y or cy < 0 or cx >= x or cx < 0:
return 0
if m[cy][c... | File "/tmp/tmpdqg2lb6z/tmp0_q_naea.py", line 2
x,y = list(map(int,input()split()))
^^^^^^^^^^^^^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?
| |
s244721465 | p00711 | u209989098 | 1529216865 | Python | Python3 | py | Runtime Error | 0 | 0 | 460 | while 1:
x,y = list(map(int,input().split()))
if x == 0:
break
pp = [1,-1,0,0]
qq = [0,0,1,-1]
m = []
for i in range(y):
m.append(list(input()))
if '@' in m[-1]:
ss = m[-1].index('@')
tt = i
cnt = 0
def move (cx,cy):
global cnt
if cy >= y or cy < 0 or cx >= x or cx < 0:
return
if m[cy][cx... | File "/tmp/tmpgrl89562/tmpc553hfrs.py", line 20
if m[cy][cx] = '.'v or m[cy][cx] = '@'
^^^^^^^^^
SyntaxError: cannot assign to subscript here. Maybe you meant '==' instead of '='?
| |
s861849096 | p00711 | u209989098 | 1529216940 | Python | Python3 | py | Runtime Error | 0 | 0 | 462 | while 1:
x,y = list(map(int,input().split()))
if x == 0:
break
pp = [1,-1,0,0]
qq = [0,0,1,-1]
m = []
for i in range(y):
m.append(list(input()))
if '@' in m[-1]:
ss = m[-1].index('@')
tt = i
cnt = 0
def move (cx,cy):
global cnt
if cy >= y or cy < 0 or cx >= x or cx < 0:
return
if m[cy][cx... | File "/tmp/tmpoaunp7du/tmp4n89fror.py", line 20
if m[cy][cx] == '.'v or m[cy][cx] == '@'
^
SyntaxError: invalid syntax
| |
s563104688 | p00711 | u209989098 | 1529216956 | Python | Python3 | py | Runtime Error | 0 | 0 | 461 | while 1:
x,y = list(map(int,input().split()))
if x == 0:
break
pp = [1,-1,0,0]
qq = [0,0,1,-1]
m = []
for i in range(y):
m.append(list(input()))
if '@' in m[-1]:
ss = m[-1].index('@')
tt = i
cnt = 0
def move (cx,cy):
global cnt
if cy >= y or cy < 0 or cx >= x or cx < 0:
return
if m[cy][cx... | File "/tmp/tmpxt7_m6f4/tmpgr0y39n0.py", line 20
if m[cy][cx] == '.' or m[cy][cx] == '@'
^
SyntaxError: expected ':'
| |
s075045253 | p00711 | u500292616 | 1530672286 | Python | Python3 | py | Runtime Error | 0 | 0 | 1005 | # -*- coding: utf-8 -*-
#rea and blac
h,w=1,1
count=0
def search(x,y):
#マップの外側か壁の場合は何もしない
#print(x,y)
global count
if x<0 or x>w-1 or y<0 or y>h-1 or map_data[y][x]=='#':
return
#以前に到達していたら何もしない
if reached[y][x]:
return
reached[y][x]=1
count+=1
#pr... | Traceback (most recent call last):
File "/tmp/tmpwpe7flyd/tmpaztauzsg.py", line 39, in <module>
w,h=map(int ,raw_input().split())
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s964474388 | p00711 | u500292616 | 1530672307 | Python | Python3 | py | Runtime Error | 0 | 0 | 1005 | # -*- coding: utf-8 -*-
#rea and blac
h,w=1,1
count=0
def search(x,y):
#マップの外側か壁の場合は何もしない
#print(x,y)
global count
if x<0 or x>w-1 or y<0 or y>h-1 or map_data[y][x]=='#':
return
#以前に到達していたら何もしない
if reached[y][x]:
return
reached[y][x]=1
count+=1
#pr... | Traceback (most recent call last):
File "/tmp/tmpwz3as7tv/tmpt99ut7ga.py", line 39, in <module>
w,h=map(int ,raw_input().split())
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s176034487 | p00711 | u500292616 | 1530684034 | Python | Python3 | py | Runtime Error | 0 | 0 | 1005 | # -*- coding: utf-8 -*-
#rea and blac
h,w=1,1
count=0
def search(x,y):
#マップの外側か壁の場合は何もしない
#print(x,y)
global count
if x<0 or x>w-1 or y<0 or y>h-1 or map_data[y][x]=='#':
return
#以前に到達していたら何もしない
if reached[y][x]:
return
reached[y][x]=1
count+=1
#pr... | Traceback (most recent call last):
File "/tmp/tmp0eppt8t2/tmpgcegkg11.py", line 39, in <module>
w,h=map(int ,raw_input().split())
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s323550655 | p00711 | u500292616 | 1530684069 | Python | Python3 | py | Runtime Error | 0 | 0 | 1005 | # -*- coding: utf-8 -*-
#rea and blac
h,w=1,1
count=0
def search(x,y):
#マップの外側か壁の場合は何もしない
#print(x,y)
global count
if x<0 or x>w-1 or y<0 or y>h-1 or map_data[y][x]=='#':
return
#以前に到達していたら何もしない
if reached[y][x]:
return
reached[y][x]=1
count+=1
#pr... | Traceback (most recent call last):
File "/tmp/tmpfe7sxrbs/tmpef_fotx3.py", line 39, in <module>
w,h=map(int ,raw_input().split())
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s354542968 | p00711 | u617183767 | 1396838531 | Python | Python | py | Runtime Error | 0 | 0 | 1163 | # -*- coding: utf-8 -*-
count = 0
def dfs(i, j, island):
global count
print i, j
dxy = [(1, 0), (0, 1), (-1, 0), (0, -1)]
if i < 0 or i >= len(island) or j < 0 or j >= len(island[0]):
return
if island[i][j] == '#' or island[i][j] == 'x':
return
island[i][j] = 'x'
coun... | File "/tmp/tmpdi1hfk3v/tmpfd1isihe.py", line 6
print i, j
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s460079590 | p00711 | u617183767 | 1396838593 | Python | Python | py | Runtime Error | 0 | 0 | 1156 | # -*- coding: utf-8 -*-
count = 0
def dfs(i, j, island):
global count
#print i, j
dxy = [(1, 0), (0, 1), (-1, 0), (0, -1)]
if i < 0 or i >= len(island) or j < 0 or j >= len(island[0]):
return
if island[i][j] == '#' or island[i][j] == 'x':
return
island[i][j] = 'x'
cou... | File "/tmp/tmpjuhefrfd/tmp2ub9bqsd.py", line 32
print count
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s915696254 | p00712 | u269391636 | 1523792797 | Python | Python3 | py | Runtime Error | 0 | 0 | 574 | from fractions import Fraction
def frac(n):
return(Fraction(1,n))
def part(s,a,n,m):
if s == 0:
return(1)
k = int(1/s)
if n == 1:
if frac(k) == s and k <= a:
return(1)
else:
return(0)
else:
ans = 0
for i in range(max(k,m),min(a,int(n/... | File "/tmp/tmpgnzi9ywd/tmp9fia4qcf.py", line 17
for i in range(max(k,m),min(a,int(n/s))+1q):
^
SyntaxError: invalid decimal literal
| |
s038192369 | p00712 | u779627195 | 1353169056 | Python | Python | py | Runtime Error | 0 | 0 | 490 | EPS = 10**(-8)
def f(i, cnt, total, prod):
global p,q,a,n
#print p,q,a,n
#print p/float(q), i, cnt, total, prod
if(abs(total-p/float(q))<EPS):
return 1
if(total+(n-cnt)*1.0/i+EPS<p/float(q) or p/float(q)<total-EPS
or cnt+1>n or prod*i>a):
return 0
return f(i,cnt+1,total+1... | File "/tmp/tmpq0r56prb/tmp0c5jmvfa.py", line 18
print f(1, 0, 0, 1)
^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s999626458 | p00712 | u617183767 | 1400661851 | Python | Python | py | Runtime Error | 0 | 0 | 809 | # -*- coding: utf-8 -*-
def dfs(num, dem, k, cur_num, prd, p, q, a, n):
#print num, dem, k, cur_num, prd
#time.sleep(0.5)
if num == 0:
#print "result: " + str(result)
return 1
result = 0
i = cur_num
while prd * i <= a:
#print i, num, dem, k, cur_num, prd
if (n... | File "/tmp/tmp44q8tapw/tmp192bqbal.py", line 35
print dfs(p, q, 0, 1, 1, p, q, a, n)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s304224450 | p00712 | u617183767 | 1400661904 | Python | Python | py | Runtime Error | 0 | 0 | 798 | # -*- coding: utf-8 -*-
def dfs(num, dem, k, cur_num, prd, p, q, a, n):
#print num, dem, k, cur_num, prd
#time.sleep(0.5)
if num == 0:
#print "result: " + str(result)
return 1
result = 0
while prd * i <= a:
#print i, num, dem, k, cur_num, prd
if (n - k) * dem < n... | File "/tmp/tmpokn1ylhj/tmp71l4z2wk.py", line 35
print dfs(p, q, 0, 1, 1, p, q, a, n)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s264335019 | p00712 | u617183767 | 1400662012 | Python | Python | py | Runtime Error | 0 | 0 | 813 | # -*- coding: utf-8 -*-
def dfs(num, dem, k, cur_num, prd, p, q, a, n):
#print num, dem, k, cur_num, prd
#time.sleep(0.5)
if num == 0:
#print "result: " + str(result)
return 1
result = 0
i = cur_num
while prd * i <= a:
#print i, num, dem, k, cur_num, prd
if (n... | File "/tmp/tmpwr2s_6_f/tmpxlk0ylu8.py", line 35
print dfs(p, q, 0, 1, 1, p, q, a, n)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.