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
s752451289
p00047
u301729341
1481337874
Python
Python3
py
Runtime Error
0
0
188
Ans = "A" while True: Pos = list(map(str,input().split(","))) if Pos == ['']: print(Ans) break if Ans in Pos: Ans = Pos[((Pos.index(Ans)) + 1) % 2]
Traceback (most recent call last): File "/tmp/tmpu68ljzu2/tmpfmyeoxej.py", line 4, in <module> Pos = list(map(str,input().split(","))) ^^^^^^^ EOFError: EOF when reading a line
s501507460
p00047
u301729341
1481337945
Python
Python3
py
Runtime Error
0
0
162
Ans = "A" while True: try: if Ans in Pos: Ans = Pos[((Pos.index(Ans)) + 1) % 2] except EOFError: print(Ans) break
File "/tmp/tmpta3jts51/tmpkly6x5l2.py", line 8 break IndentationError: unexpected indent
s413333798
p00047
u301729341
1481338011
Python
Python3
py
Runtime Error
0
0
153
Ans = "A" while True: try: if Ans in Pos: Ans = Pos[((Pos.index(Ans)) + 1) % 2] except: print(Ans) break
File "/tmp/tmpj905bae9/tmp2nv2tucp.py", line 8 break IndentationError: unexpected indent
s536900963
p00047
u546285759
1484028660
Python
Python3
py
Runtime Error
0
0
432
cups=[True, False, False] for line in sys.stdin: l= line.strip().split(",") if "A"in l and "B"in l: cups[0], cups[1]= cups[1], cups[1] elif "A"in l and "C"in l: cups[0], cups[2]= cups[2], cups[0] else: cups[1], cups[2]= cups[2], cups[1] for i in range(3): if cups[i]: if i== 0: print('A') elif i== 1: print('B') else: print('C')
Traceback (most recent call last): File "/tmp/tmp9eaw4eb9/tmpek2k3y00.py", line 2, in <module> for line in sys.stdin: ^^^ NameError: name 'sys' is not defined
s323539676
p00047
u024715419
1517900389
Python
Python3
py
Runtime Error
0
0
201
d = {"A":1, "B":0, "C":0} while True: try: swap1, awap2 = input().split(",") d[swap1], d[swap2] = d[swap2], d[swap1] except: break print(d.keys()[d.values().index(1)])
Traceback (most recent call last): File "/tmp/tmp64istreq/tmptqzp_d00.py", line 8, in <module> print(d.keys()[d.values().index(1)]) ^^^^^^^^^^^^^^^^ AttributeError: 'dict_values' object has no attribute 'index'
s767977443
p00047
u763301852
1364904860
Python
Python
py
Runtime Error
0
0
190
p = "A" while True: try: s, t = raw_input().split(",") except EOFError as e: break if s == p: p = t elif t == p: p = s print("%s" % (chA, ))
Traceback (most recent call last): File "/tmp/tmpf8ij2rwu/tmpxp6tw0q1.py", line 5, in <module> s, t = raw_input().split(",") ^^^^^^^^^ NameError: name 'raw_input' is not defined
s606769558
p00047
u633068244
1393585218
Python
Python
py
Runtime Error
0
0
274
ls = {"A":0, "B":1, "C":2} cup = [1,0,0] while 1: try: x, y = map(str, raw_input().split(",")) tmp = cup[ls[x]] cup[ls[x]] = cup[ls[y]] cup[ls[y]] = cup[ls[x]] except: break p = cup.index(1) if c == 0: print "A" else: print "B" if c == 1 else "C"
File "/tmp/tmphpt_fiyf/tmpcg2m9gzl.py", line 5 x, y = map(str, raw_input().split(",")) TabError: inconsistent use of tabs and spaces in indentation
s040075443
p00048
u897769968
1556747590
Python
Python3
py
Runtime Error
0
0
740
while(True): try: weight = float(input()) if(weight <= 48.00): print("light fly") elif(weight <= 51.00): print("fly") elif(weight <= 54.00): print("bantam") elif(weight <= 57.00): print("feather") elif(weight <= 60.00): print("light") elif(weight <= 64.00): print("light welter") elif(weight <= 69.00): print("welter") elif(weight <= 75.00): print("light middle") elif(weight <= 81.00): print("middle") elif(weight <= 91.00): print("light heavy") else: print("heavy") except ValueError: break;
Traceback (most recent call last): File "/tmp/tmp6bv7mjpq/tmplidgfvub.py", line 3, in <module> weight = float(input()) ^^^^^^^ EOFError: EOF when reading a line
s777091276
p00048
u897769968
1556747956
Python
Python3
py
Runtime Error
0
0
736
while 1: try: weight = float(input()) if(weight <= 48.00): print("light fly") elif(weight <= 51.00): print("fly") elif(weight <= 54.00): print("bantam") elif(weight <= 57.00): print("feather") elif(weight <= 60.00): print("light") elif(weight <= 64.00): print("light welter") elif(weight <= 69.00): print("welter") elif(weight <= 75.00): print("light middle") elif(weight <= 81.00): print("middle") elif(weight <= 91.00): print("light heavy") else: print("heavy") except ValueError: break;
Traceback (most recent call last): File "/tmp/tmpajiuofwa/tmp2w0f__1k.py", line 3, in <module> weight = float(input()) ^^^^^^^ EOFError: EOF when reading a line
s389111010
p00048
u075836834
1458322774
Python
Python3
py
Runtime Error
0
0
502
def Class(x): if x<=48.0: print("light fly") elif 48.0<x<=51.0: print("fly") elif 51.0<x<=54.0: print("bantam") elif 54.0<x<=57.0: print("feather") elif 57.0<x<=60.0: print("light") elif 60.0<x<=64.0: print("light welter") elif 64.0<x<=69.0: print("welter") elif 69.0<x<=75.0: print("light middle") elif 75.0<x<=81.0: print("middle") elif 81.0<x<=91.0: print("light heavy") else: ptinr("heavy") while True: try: x=float(input()) Class(x) except EOFError: break
s588785287
p00048
u300946041
1473689930
Python
Python3
py
Runtime Error
0
0
697
# -*- coding: utf-8 -*- def judge_class(s): if s <= 48.00: return 'light fly' elif 48.00 < s <= 51.00: return 'fly' elif 51.00 < s <= 54.00: return 'bantam' elif 54.00 < s <= 57.00: return 'feather' elif 57.00 < s <= 60.00: return 'light' elif 60.00 < s <= 64.00: return 'light welter' elif 64.00 < s <= 69.00: return 'welter' elif 69.00 < s <= 75.00: return 'light middle' elif 75.00 < s <= 81.00: return 'middle' elif 81.00 < s <= 91.00: return 'light heavy' elif 91.00 <= s: return 'heavy' if __name__ == '__main__': s = input() print(judge_class(s))
Traceback (most recent call last): File "/tmp/tmpjeg29mmr/tmp_s9674c6.py", line 30, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s954816895
p00048
u498511622
1501490380
Python
Python3
py
Runtime Error
0
0
437
while True: w=float(input()) if w<=48: judge='light fly' elif 48<=w<=51: judge='fly' elif 51<=w<=54: judge='bantam' elif 54<=w<=57: judge='feather' elif 57<=w<=60: judge='light' elif 60<=w<=64: judge='light welter' elif 64<=w<=69: judge='welter' elif 69<=w<=75: judge='light middle' elif 75<=w<=81: judge='middle' elif 81<=w<=91: judge='light heavy' elif w>=91: judge='heavy' print(judge)
Traceback (most recent call last): File "/tmp/tmp0yyw83d5/tmp4u8i_2wh.py", line 2, in <module> w=float(input()) ^^^^^^^ EOFError: EOF when reading a line
s978803030
p00048
u498511622
1501490534
Python
Python3
py
Runtime Error
0
0
448
while True: w=float(input()) if w<=48: judge='light fly' elif 48<=w<=51: judge='fly' elif 51<=w<=54: judge='bantam' elif 54<=w<=57: judge='feather' elif 57<=w<=60: judge='light' elif 60<=w<=64: judge='light welter' elif 64<=w<=69: judge='welter' elif 69<=w<=75: judge='light middle' elif 75<=w<=81: judge='middle' elif 81<=w<=91: judge='light heavy' elif w>91: judge='heavy' print(judge)
Traceback (most recent call last): File "/tmp/tmp6o4hnqef/tmp98jtedut.py", line 2, in <module> w=float(input()) ^^^^^^^ EOFError: EOF when reading a line
s599683040
p00048
u498511622
1501490543
Python
Python3
py
Runtime Error
0
0
446
while True: w=int(input()) if w<=48: judge='light fly' elif 48<=w<=51: judge='fly' elif 51<=w<=54: judge='bantam' elif 54<=w<=57: judge='feather' elif 57<=w<=60: judge='light' elif 60<=w<=64: judge='light welter' elif 64<=w<=69: judge='welter' elif 69<=w<=75: judge='light middle' elif 75<=w<=81: judge='middle' elif 81<=w<=91: judge='light heavy' elif w>91: judge='heavy' print(judge)
Traceback (most recent call last): File "/tmp/tmpgvr6fu3j/tmp4id5mi91.py", line 2, in <module> w=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s105229632
p00048
u912237403
1388464218
Python
Python
py
Runtime Error
0
0
263
import sys c=["light fly", "fly", "bantam", "feather", "light", "light welter", "welter", "light middle", "middle", "light heavy", "heavy"] w=[48,51,54,57,60,64,69,75,81,91] for s in map(float,sys.stdin): i=0; while w[i]<s: i+=1 print c[i]
File "/tmp/tmplzlgwtym/tmpqwusq79d.py", line 10 print c[i] ^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s476992766
p00048
u912237403
1388464410
Python
Python
py
Runtime Error
0
0
262
import sys c=["light fly", "fly", "bantam", "feather", "light", "light welter", "welter", "light middle", "middle", "light heavy", "heavy"] w=[48,51,54,57,60,64,69,75,81,91] for s in map(float,sys.stdin): i=0 while w[i]<s: i+=1 print c[i]
File "/tmp/tmpn97dpq9y/tmpa3r9tflj.py", line 10 print c[i] ^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s160360204
p00048
u633068244
1393665582
Python
Python
py
Runtime Error
0
0
640
while True: try: w = float(raw_input()) if w <= 48.0: print "light fly" elif w <= 51.0: print "fly" elif w <= 54.0: print "bantam" elif w <= 57.0: print "feather" elif w <= 60: print "light" elif w <= 64.0: print "light welter" elif w <= 69.0: print "welter" elif w <= 75.0: print "light middle" elif w <= 81.0 print "middle" elif w <= 91.0: print "light heavy" else: print "heavy" except: break
File "/tmp/tmp49qpbl77/tmpui3pj_we.py", line 5 print "light fly" ^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s909360134
p00049
u560838141
1410782343
Python
Python
py
Runtime Error
0
0
174
d = {}; d["A"] = 0; d["B"] = 0; d["AB"] = 0; d["O"] = 0; while True: b = raw_input().strip().split(",")[1] d[b] += 1; print d["A"] print d["B"] print d["AB"] print d["O"]
File "/tmp/tmpd0js6b9_/tmpt949jcaj.py", line 11 print d["A"] ^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s366697547
p00049
u130979865
1461298170
Python
Python
py
Runtime Error
0
0
190
# -*- coding: utf-8 -*- import sys dic = {'A':0, 'B':0, 'AB':0, 'O':0} for line in sys.stdin: id, type = map(int, line.split(',')) dic[type] += 1 for key in dic: print dic[key]
File "/tmp/tmpbv5_ux6z/tmpvicjxgnt.py", line 10 print dic[key] ^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s388857335
p00049
u765849500
1462263730
Python
Python
py
Runtime Error
0
0
271
a = 0 b= 0 ab = 0 o = 0 n = 0 while n < 15: temp = input.split(",")[1] if 'A' in temp: a += 1 elif 'B' in temp: b += 1 elif 'AB' in temp: ab += 1 elif'O' in temp: o += 1 print a print b print ab print o
File "/tmp/tmplslv9b85/tmppiklotj0.py", line 16 print a ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s267104724
p00049
u765849500
1462263889
Python
Python
py
Runtime Error
0
0
299
#coding: UTF-8 a = 0 b= 0 ab = 0 o = 0 n = 0 while n < 15: temp = input.split(",")[1] if temp == 'A': a += 1 elif temp == 'B': b += 1 elif temp == 'AB': ab += 1 elif temp == 'O': o += 1 print a print b print ab print o n += 1
File "/tmp/tmp3bfzg9ii/tmp3ktzchvo.py", line 18 print a ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s544928026
p00049
u765849500
1462264171
Python
Python
py
Runtime Error
0
0
263
a = 0 b= 0 ab = 0 o = 0 while True: temp = input.split(',')[1] if temp == 'A': a += 1 elif temp == 'B': b += 1 elif temp == 'AB': ab += 1 elif temp == 'O': o += 1 print a print b print ab print o
File "/tmp/tmpw1lidvng/tmppzri6lw9.py", line 15 print a ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s322153908
p00049
u032662562
1487258514
Python
Python3
py
Runtime Error
0
0
261
hist = {} while True: try: i,b = input().strip().split(',') if b in hist: hist[b] += 1 else: hist[b] = 1 except EOFError: break print("%d\n%d\n%d\n%d" % (hist['A'],hist['B'],hist['AB'],hist['O']))
Traceback (most recent call last): File "/tmp/tmpa3bbxkzx/tmpd6n2wkrs.py", line 12, in <module> print("%d\n%d\n%d\n%d" % (hist['A'],hist['B'],hist['AB'],hist['O'])) ~~~~^^^^^ KeyError: 'A'
s879439147
p00049
u912237403
1388471363
Python
Python
py
Runtime Error
0
0
146
import sys b={} for s in sys.stdin: i = s[s.index(',')+1:-1] try: b[i]+=1 except: b[i]=1 for e in [0,1,3,2]: print b[b.keys()[e]]
File "/tmp/tmpk7g72n1p/tmpn1j8y0s4.py", line 9 print b[b.keys()[e]] ^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s855568053
p00049
u912237403
1388471602
Python
Python
py
Runtime Error
0
0
162
import sys b={} for s in sys.stdin: i = s[s.index(',')+1:-1] try: b[i]+=1 except: b[i]=1 for e in [0,1,3,2]: print b[b.keys()[e]]
File "/tmp/tmprpayl3f3/tmprcxvs_5g.py", line 11 print b[b.keys()[e]] ^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s776994192
p00050
u560838141
1410782535
Python
Python
py
Runtime Error
0
0
101
print raw_input().replace("apple", "!#$%!"#$").replace("peach", "apple").replace("!#$%!"#$", "peach")
File "/tmp/tmpkl19nrqf/tmpr39flpk9.py", line 1 print raw_input().replace("apple", "!#$%!"#$").replace("peach", "apple").replace("!#$%!"#$", "peach") ^ SyntaxError: '(' was never closed
s913060153
p00050
u140201022
1449764367
Python
Python
py
Runtime Error
0
0
208
ans=[] for i in l: if 'peach' in i: ans.append(i.replace('peach','apple')) elif 'apple' in i: ans.append(i.replace('apple','peach')) else: ans.append(i) print ' '.join(ans)
File "/tmp/tmp5fqu1jgq/tmpi9d6agwa.py", line 9 print ' '.join(ans) ^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s398242724
p00050
u140201022
1449764402
Python
Python
py
Runtime Error
0
0
218
import re ans=[] for i in l: if 'peach' in i: ans.append(i.replace('peach','apple')) elif 'apple' in i: ans.append(i.replace('apple','peach')) else: ans.append(i) print ' '.join(ans)
File "/tmp/tmpvzvg04zj/tmpmjxgbtqu.py", line 10 print ' '.join(ans) ^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s958276032
p00050
u894114233
1468655273
Python
Python
py
Runtime Error
0
0
380
import string sen=map(str,raw_input().split()) ans=[] for i in sen: if i[0:5]=="apple": if len(i)>5: ans.append("peach"+i[5:]) else: ans.appned("peach") elif i[0:5]=="peach": if len(i)>5: ans.append("apple"+i[5:]) else: ans.append("apple") else: ans.append(i) print(" ".join(ans))
Traceback (most recent call last): File "/tmp/tmpfb9on6jy/tmpgoywtozq.py", line 2, in <module> sen=map(str,raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s434377738
p00050
u894114233
1468655382
Python
Python
py
Runtime Error
0
0
464
sen=map(str,raw_input().split()) ans=[] for i in sen: if len(i)>=5: if i[0:5]=="apple": if len(i)>5: ans.append("peach"+i[5:]) else: ans.appned("peach") elif i[0:5]=="peach": if len(i)>5: ans.append("apple"+i[5:]) else: ans.append("apple") else: ans.append(i) else: ans.append(i) print(" ".join(ans))
Traceback (most recent call last): File "/tmp/tmpd6wdbeew/tmpjallav63.py", line 1, in <module> sen=map(str,raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s130297182
p00050
u300946041
1471305447
Python
Python3
py
Runtime Error
0
0
340
sentence = input().split() # sentence = 'the cost of one peach is higher than that of one apple.'.split() def converter(s): if 'apple' == s or 'apple.' == s: return s.replace('apple', 'peach') elif 'peach' == s or 'peach.' == s: return s.replace('peach', 'apple') print(' '.join(map(converter, sentence)), end='')
Traceback (most recent call last): File "/tmp/tmpm4b73ocm/tmp6jom3wsf.py", line 1, in <module> sentence = input().split() ^^^^^^^ EOFError: EOF when reading a line
s924304061
p00050
u661290476
1483189946
Python
Python
py
Runtime Error
0
0
191
s=input().rstrip(".").split() v=[] for i in s: if i=="peach": v.append("apple") elif i=="apple": v.append("peach") else: v.append(i) print(" ".join(v)+".")
Traceback (most recent call last): File "/tmp/tmpvgb_ime6/tmpgru19kuh.py", line 1, in <module> s=input().rstrip(".").split() ^^^^^^^ EOFError: EOF when reading a line
s314281080
p00050
u519227872
1497627560
Python
Python3
py
Runtime Error
0
0
239
s = input().split() ss = [] for w in s: a = w.find('apple') p = w.find('peach') if a != -1: w = w.replace('apple','peach') elif p != -1: w = w.replace('peach','apple') ss.append(word) print(' '.join(ss))
Traceback (most recent call last): File "/tmp/tmp0k3l2ex8/tmpdlaln1f_.py", line 1, in <module> s = input().split() ^^^^^^^ EOFError: EOF when reading a line
s540260124
p00050
u150984829
1519073682
Python
Python3
py
Runtime Error
0
0
136
a,p='apple','peach' t={a:p,p:a} print(*[t[w]if 5==len(w)and if w in t else t[w[:5]]+w[5:]if w[:5]in t else w for w in input().split()])
File "/tmp/tmpbnd9spll/tmpq75iechg.py", line 3 print(*[t[w]if 5==len(w)and if w in t else t[w[:5]]+w[5:]if w[:5]in t else w for w in input().split()]) ^^ SyntaxError: Invalid star expression
s323556369
p00051
u145563629
1428811334
Python
Python
py
Runtime Error
0
0
118
st = [] n = raw_input() for s in n: st.append(s) s.sort() a = int("".join()) b = int("".join(s[::-1])) print b - a
File "/tmp/tmphitqazae/tmpmp11qi93.py", line 11 print b - a ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s701366904
p00051
u145563629
1428811425
Python
Python
py
Runtime Error
0
0
162
i = raw_input() while (i): i -= 1 st = [] n = raw_input() for s in n: st.append(s) s.sort() a = int("".join()) b = int("".join(s[::-1])) print b - a
File "/tmp/tmp6dy93p_i/tmpno2hhx75.py", line 15 print b - a ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s442154464
p00051
u145563629
1428811449
Python
Python
py
Runtime Error
0
0
167
i = int(raw_input()) while (i): i -= 1 st = [] n = raw_input() for s in n: st.append(s) s.sort() a = int("".join()) b = int("".join(s[::-1])) print b - a
File "/tmp/tmpxdgnurpo/tmpt9h921s0.py", line 15 print b - a ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s544728849
p00051
u145563629
1428811501
Python
Python
py
Runtime Error
0
0
169
i = int(raw_input()) while (i): i -= 1 st = [] n = raw_input() for s in n: st.append(s) st.sort() a = int("".join()) b = int("".join(st[::-1])) print b - a
File "/tmp/tmp__en1f0c/tmppxfxybos.py", line 15 print b - a ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s608508303
p00051
u148101999
1460267163
Python
Python
py
Runtime Error
0
0
171
for i in xrange(input()): n = sorted(raw_input()) x = int("".join(n[::-1])) for j in xrange(len(n)): if n[i] == "0": del n[i] else: break print x - int("".join(n))
File "/tmp/tmpfc15p_mi/tmpokdw06mk.py", line 7 print x - int("".join(n)) ^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s009233044
p00051
u148101999
1460267280
Python
Python
py
Runtime Error
0
0
188
#encoding=utf-8 for i in xrange(input()): n = sorted(raw_input()) x = int("".join(n[::-1])) for j in xrange(len(n)): if n[i] == "0": del n[i] else: break print x - int("".join(n))
File "/tmp/tmptnunzqw7/tmpkum45a3g.py", line 9 print x - int("".join(n)) ^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s106249151
p00051
u150984829
1519074648
Python
Python3
py
Runtime Error
0
0
104
for _ in[0]*int(input()): M=''.join(sorted(input()))[::-1] print(int(M)-int(M[::-1].replace('0','')))
Traceback (most recent call last): File "/tmp/tmpx49wmxjn/tmp9k7skhsb.py", line 1, in <module> for _ in[0]*int(input()): ^^^^^^^ EOFError: EOF when reading a line
s175781671
p00051
u150984829
1519074947
Python
Python3
py
Runtime Error
0
0
98
for _ in[0]*int(input()): M=''.join(sorted(input())) print(int(M[::-1])-int(M.replace('0','')))
Traceback (most recent call last): File "/tmp/tmpo4zmtsz6/tmp4236in0p.py", line 1, in <module> for _ in[0]*int(input()): ^^^^^^^ EOFError: EOF when reading a line
s788781635
p00051
u553148578
1530524959
Python
Python3
py
Runtime Error
0
0
167
while True: x = int(input()) for i in range(x): li = list(input()) li1 = int("".join(sorted(li))) li2 = int("".join(sorted(li,reverse=True))) print(li2-li1)
Traceback (most recent call last): File "/tmp/tmp1ng5y1i9/tmp9ua2pvy1.py", line 2, in <module> x = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s466467686
p00051
u553148578
1530524992
Python
Python3
py
Runtime Error
0
0
194
while True: x = int(input()) for i in range(x): try: li = list(input()) except: break li1 = int("".join(sorted(li))) li2 = int("".join(sorted(li,reverse=True))) print(li2-li1)
Traceback (most recent call last): File "/tmp/tmpjo4bfyux/tmpjjn3ifwu.py", line 2, in <module> x = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s286254584
p00051
u553148578
1530525106
Python
Python3
py
Runtime Error
0
0
194
while True: x = int(input()) for i in range(x): try: li = list(input()) except: break li1 = int("".join(sorted(li))) li2 = int("".join(sorted(li,reverse=True))) print(li2-li1)
Traceback (most recent call last): File "/tmp/tmp02kky1yv/tmpvg1gw882.py", line 2, in <module> x = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s371147592
p00052
u553148578
1531293734
Python
Python3
py
Runtime Error
0
0
167
import math while True: x = math.factorial(int(input())) n = list(str(x)) con = 0 for i in range(len(n)-1,0,-1): if n[i] != '0': break con += 1 print(con)
Traceback (most recent call last): File "/tmp/tmp2_t9boe_/tmp4lk79bjb.py", line 3, in <module> x = math.factorial(int(input())) ^^^^^^^ EOFError: EOF when reading a line
s972104841
p00052
u553058997
1475660805
Python
Python3
py
Runtime Error
0
0
281
#! /usr/bin/env python import math while True: inp = input() if inp == '0': break num = math.factorial(int(inp)) cnt = 0 while True: if num % 10 == 0: cnt = cnt + 1 num = num / 10 else: break print(cnt)
Traceback (most recent call last): File "/tmp/tmptdq4zlo_/tmplbo6rc72.py", line 5, in <module> inp = input() ^^^^^^^ EOFError: EOF when reading a line
s638108952
p00052
u553058997
1475660819
Python
Python3
py
Runtime Error
0
0
258
import math while True: inp = input() if inp == '0': break num = math.factorial(int(inp)) cnt = 0 while True: if num % 10 == 0: cnt = cnt + 1 num = num / 10 else: break print(cnt)
Traceback (most recent call last): File "/tmp/tmpeoy0lt1j/tmpcyb6nuf2.py", line 4, in <module> inp = input() ^^^^^^^ EOFError: EOF when reading a line
s501188128
p00052
u553058997
1475661285
Python
Python3
py
Runtime Error
0
0
341
def factorial(n): res = 1 for i in range(1, n+1): res = res * i return res while True: inp = input() if inp == '0': break num = factorial(int(inp)) cnt = 0 while True: if num % 10 == 0: cnt = cnt + 1 num = int(num / 10) else: break print(cnt)
Traceback (most recent call last): File "/tmp/tmpukunm897/tmple5bai97.py", line 8, in <module> inp = input() ^^^^^^^ EOFError: EOF when reading a line
s104281037
p00052
u553058997
1475661306
Python
Python3
py
Runtime Error
0
0
341
def factorial(n): res = 1 for i in range(1, n+1): res = res * i return res while True: inp = input() if inp == '0': break num = factorial(int(inp)) cnt = 0 while True: if num % 10 == 0: cnt = cnt + 1 num = int(num / 10) else: break print(cnt)
Traceback (most recent call last): File "/tmp/tmptod9j2i1/tmp2ontgfa9.py", line 8, in <module> inp = input() ^^^^^^^ EOFError: EOF when reading a line
s741943419
p00052
u553058997
1475661414
Python
Python3
py
Runtime Error
0
0
283
while True: inp = input() if inp == '0': break num = 1 for i in range(1, int(inp)): num = num * i cnt = 0 while True: if num % 10 == 0: cnt = cnt + 1 num = int(num / 10) else: break print(cnt)
Traceback (most recent call last): File "/tmp/tmph2450uyv/tmpx_6y2pa4.py", line 2, in <module> inp = input() ^^^^^^^ EOFError: EOF when reading a line
s876958006
p00052
u553058997
1475661843
Python
Python
py
Runtime Error
0
0
312
while True: inp = input() if inp == '0': break num = 1 for i in range(1, int(inp)+1): num = num * i cnt = 0 strnum = str(num) while True: if strnum[-1] == '0': cnt = cnt + 1 strnum = strnum[:-1] else: break print(cnt)
Traceback (most recent call last): File "/tmp/tmpyluk9bbq/tmpw7mljool.py", line 2, in <module> inp = input() ^^^^^^^ EOFError: EOF when reading a line
s549392819
p00052
u078042885
1484109687
Python
Python3
py
Runtime Error
0
0
122
while 1: n,i=int(input()),0 if n==0:break n=str(math.factorial(n))[::-1] while n[i]=='0':i+=1 print(i)
Traceback (most recent call last): File "/tmp/tmpea95j6zk/tmpv4zm7fv_.py", line 2, in <module> n,i=int(input()),0 ^^^^^^^ EOFError: EOF when reading a line
s356257280
p00052
u150984829
1519211877
Python
Python3
py
Runtime Error
0
0
77
for e in iter(input,'0'): e=int(e) print(sum(n//5**i)for i in range(1,6)))
File "/tmp/tmpu3fndfey/tmpedlyt3hj.py", line 3 print(sum(n//5**i)for i in range(1,6))) ^ SyntaxError: unmatched ')'
s482005356
p00052
u150984829
1519211901
Python
Python3
py
Runtime Error
0
0
77
for e in iter(input,'0'): e=int(e) print(sum(e//5**i)for i in range(1,6)))
File "/tmp/tmpnsekieeu/tmph9yhj_vn.py", line 3 print(sum(e//5**i)for i in range(1,6))) ^ SyntaxError: unmatched ')'
s863684038
p00052
u150984829
1519211915
Python
Python3
py
Runtime Error
0
0
76
for e in iter(input,'0'): e=int(e) print(sum(e//5**ifor i in range(1,6)))
File "/tmp/tmp4w_96ck6/tmpkzfu4wz7.py", line 3 print(sum(e//5**ifor i in range(1,6))) ^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: invalid syntax. Perhaps you forgot a comma?
s073386084
p00052
u912237403
1388838459
Python
Python
py
Runtime Error
0
0
138
import sys for n in sys.stdin: c=0 for i in range(1,int(n)+1): while i%5==0: i/=5 c+=1 print c
File "/tmp/tmpau9pt0dj/tmpk3hbs8zg.py", line 8 print c ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s391135431
p00052
u912237403
1388838934
Python
Python
py
Runtime Error
0
0
150
import sys for n in sys.stdin: c=0 for i in range(1,int(n)+1): j=i while j%5==0: j/=5 c+=1 print c
File "/tmp/tmpbnnwv7vk/tmp0gtllxtm.py", line 9 print c ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s924554871
p00053
u553148578
1531294544
Python
Python3
py
Runtime Error
0
0
290
import math n = [] li = [] li = [i for i in range(2,100000)] while li[0] <= int(math.sqrt(100000)): n.append(li[0]) sss = li[0] li = [i for i in li if i % sss != 0] n.extend(li) while True: ans = 0 x = int(input()) if x == 0: break for i in range(x): ans += n[i] print(ans)
Traceback (most recent call last): File "/tmp/tmpaxeswchx/tmp0vsrg2es.py", line 13, in <module> x = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s637131398
p00053
u553148578
1531294631
Python
Python3
py
Runtime Error
0
0
290
import math n = [] li = [] li = [i for i in range(2,100000)] while li[0] <= int(math.sqrt(100000)): n.append(li[0]) sss = li[0] li = [i for i in li if i % sss != 0] n.extend(li) while True: ans = 0 x = int(input()) if x == 0: break for i in range(x): ans += n[i] print(ans)
Traceback (most recent call last): File "/tmp/tmpx_0q7rkx/tmp6nen7pue.py", line 13, in <module> x = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s675561746
p00053
u553148578
1531294686
Python
Python3
py
Runtime Error
0
0
288
import math n = [] li = [] li = [i for i in range(2,10000)] while li[0] <= int(math.sqrt(10000)): n.append(li[0]) sss = li[0] li = [i for i in li if i % sss != 0] n.extend(li) while True: ans = 0 x = int(input()) if x == 0: break for i in range(x): ans += n[i] print(ans)
Traceback (most recent call last): File "/tmp/tmph2lduo1t/tmpe0lo1rrq.py", line 13, in <module> x = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s338865477
p00053
u579833671
1410916886
Python
Python
py
Runtime Error
0
0
427
isPrime = [True] * 10001 sum = 0 sumPrime = [sum] def calcPrime(): global sum isPrime[0] = isPrime[1] = False for i in range(len(isPrime)): if(isPrime[i]): sum += i sumPrime.append(sum) for j in range(2 * i, len(isPrime), i): isPrime[j] = False calcPrime() while(True): n = input() if(n == 0): break print(sumPrime[n])
Traceback (most recent call last): File "/tmp/tmp7lildc3y/tmpuvwhtcjt.py", line 16, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s461405570
p00053
u744114948
1426155210
Python
Python3
py
Runtime Error
0
0
381
def pri(s,n): tab=[i for i in range(n+1) if s[i] and i>=2] return(tab) s=[True for _ in range(999999+1)] i=2 while i**2<=999999: if s[i]: j=i*2 while j<=999999: s[j]=False j+=i i+=1 s=pri(s,10000) while True: n = int(input()) if n == 0: break sum = 0 for i in range(n): sum += s[i] print(sum)
Traceback (most recent call last): File "/tmp/tmpdezpmq61/tmpajaq5qpc.py", line 17, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s515843932
p00053
u994049982
1458660072
Python
Python
py
Runtime Error
0
0
229
a=map(int,raw_input().split())[1:] import math def p(a): b,c,i=range(2,2*math.log(a)*a)),[],0 while len(b)!=0: c.append(b[0]) b=[i for i in b[1:] if i%b[0]!=0] return sum(c) for i in a:print(str(p(i)))
File "/tmp/tmpax6zv5c4/tmpirh80vsd.py", line 4 b,c,i=range(2,2*math.log(a)*a)),[],0 ^ SyntaxError: unmatched ')'
s842137713
p00053
u994049982
1458660120
Python
Python
py
Runtime Error
0
0
234
a=map(int,raw_input().split()) a=a[:-1] import math def p(a): b,c,i=range(2,2*math.log(a)*a)),[],0 while len(b)!=0: c.append(b[0]) b=[i for i in b[1:] if i%b[0]!=0] return sum(c) for i in a:print(str(p(i)))
File "/tmp/tmp2rz6bcho/tmp2u1ll1h9.py", line 5 b,c,i=range(2,2*math.log(a)*a)),[],0 ^ SyntaxError: unmatched ')'
s873064494
p00053
u994049982
1458660790
Python
Python
py
Runtime Error
0
0
274
import math def p(a): b,c,i=range(2,int(10+2*math.log(a)*a)),[],0 while len(c)!=a: c.append(b[0]) b=[i for i in b[1:] if i%b[0]!=0] return sum(c) a=map(int,input().split()) for i in a: if i!=0: print(str(p(i))) else: break
Traceback (most recent call last): File "/tmp/tmp301_u_kz/tmptysycgek.py", line 8, in <module> a=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s864335841
p00053
u994049982
1458662009
Python
Python3
py
Runtime Error
0
0
310
def p(a): b=[] i=1 while len(b)!=a: i+=1 if ip(i):b.append(i) return sum(b) def ip(a): i=2 while a>=i**2: if a%i==0:return False i+=1 return True a=map(int,raw_input().split()) for i in a: if i!=0: print(str(p(i))) else: break
Traceback (most recent call last): File "/tmp/tmpuyvbr_by/tmpjgi6bfa0.py", line 14, in <module> a=map(int,raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s115060570
p00053
u130979865
1461300197
Python
Python
py
Runtime Error
0
0
353
# -*- coding: utf-8 -*- primes = [2] n = 3 while n < 10000: flag = True for p in primes: if n % p == 0: flag = False break if flag: primes.append(n) n += 1 while True: n = int(raw_input()) if n == 0: break sum = 0 for i in range(n): sum += primes[i] print sum
File "/tmp/tmpxbrdfoms/tmp6wxb0h2s.py", line 22 print sum ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s950248350
p00053
u546285759
1483587752
Python
Python3
py
Runtime Error
0
0
278
import sys pn, tmp = [], [i for i in range(2, 10000)] while tmp[0] < 100: v = tmp.pop(0) pn.append(v) tmp = list(filter(lambda x: x%v!=0, tmp)) for t in tmp: pn.append(t) while True: n = int(input()) if n==0: break print(sum([pn[i] for i in range(n)]))
Traceback (most recent call last): File "/tmp/tmp7pabgve0/tmpsvcog2t9.py", line 11, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s480812832
p00053
u711765449
1485700386
Python
Python3
py
Runtime Error
0
0
447
def mark(s, x): for i in range(x + x, len(s), x): s[i] = False def sieve(n): s = [True] * n for x in range(2, int(n**0.5) + 1): if s[x]: mark(s, x) return [i for i in range(0,n) if s[i] and i > 1] n = [] while True: tmp = int(input()) if tmp == 0: break n.append(tmp) m = max(n) p = sieve(10000) for i in range(len(n)): sum = 0 for j in range(n[i]): sum += p[j] print(sum)
Traceback (most recent call last): File "/tmp/tmp0z2dpx2g/tmpzcdsaxw7.py", line 13, in <module> tmp = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s750537163
p00053
u711765449
1485700562
Python
Python3
py
Runtime Error
0
0
504
def mark(s, x): for i in range(x + x, len(s), x): s[i] = False def sieve(n): s = [True] * n for x in range(2, int(n**0.5) + 1): if s[x]: mark(s, x) return [i for i in range(0,n) if s[i] and i > 1] n = [] while True: tmp = int(input()) if tmp == 0: break n.append(tmp) m = max(n) p = sieve(10000) for i in range(len(n)): sum = 0 if n[i] == 1: print(2) else: for j in range(n[i]): sum += p[j] print(sum)
Traceback (most recent call last): File "/tmp/tmpiesdq6fa/tmp25ada3wu.py", line 13, in <module> tmp = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s247075460
p00053
u811733736
1503221624
Python
Python3
py
Runtime Error
0
0
626
Primes = [] def find_nth_prime(n): """ n??????????´???°????±??????? """ count = len(Primes) if count >= n: return if count > 0: num = Primes[-1] + 1 else: num = 2 while True: if is_prime(num): count += 1 Primes.append(num) if count >= n: break num += 1 if __name__ == '__main__': # ??????????????\??? while True: data = int(input()) if data == 0: break # ????????¨???????????¨??? find_nth_prime(data) # print(Primes) print(sum(Primes[:data]))
Traceback (most recent call last): File "/tmp/tmp11q6su13/tmpzz3726zx.py", line 23, in <module> data = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s127610265
p00053
u600263347
1517147294
Python
Python3
py
Runtime Error
0
0
449
def is_prime(q): q = abs(q) if q == 2: return True if q < 2 or q&1 == 0: return False return pow(2, q-1, q) == 1 def main(): prime = [] for i in range(10001): if is_prime(i): prime.append(i) while True: n = int(input()) if n == 0: break s = 0 for i in range(n): s += prime[i] print(s) if __name__ == '__main__': main()
Traceback (most recent call last): File "/tmp/tmp55yy_448/tmp5cbzzuko.py", line 25, in <module> main() File "/tmp/tmp55yy_448/tmp5cbzzuko.py", line 15, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s167933203
p00053
u260980560
1384874970
Python
Python
py
Runtime Error
0
0
210
s = [0] M = 10001 p = [1]*M S = 0 for i in xrange(2,M): if p[i]: for j in xrange(i*i,M,i): p[j] = 0 S += i; s.append(S) while 1: n = input() if n==0: break print s[n]
File "/tmp/tmp7c45jf8f/tmprvi035kg.py", line 13 print s[n] ^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s262204150
p00053
u633068244
1393672976
Python
Python
py
Runtime Error
0
0
306
r = 10000 sqrt = int(math.sqrt(r)) p = [1]*r p[0] = 0 for i in range(1,sqrt): if p[i]: for j in range(2*i+1,r,i+1): p[j] = 0 while True: n = int(raw_input()) if not n: break sum = 0 for i in range(n): if p[i] == 1: sum += i print sum
File "/tmp/tmpunie1kho/tmprr8wclg0.py", line 18 print sum ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s059753316
p00053
u633068244
1393673157
Python
Python
py
Runtime Error
0
0
356
import math r = 10000 sqrt = int(math.sqrt(r)) p = [1]*r p[0] = 0 for i in range(1,sqrt): if p[i]: for j in range(2*i+1,r,i+1): p[j] = 0 while True: n = int(raw_input()) if not n: break i, num = 0, 1 while num < n: if p[i] == 1: num += 1 sum += i i += 1 print sum
File "/tmp/tmpzrtri_dl/tmpg0gywjkf.py", line 21 print sum ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s197391369
p00053
u633068244
1393673249
Python
Python
py
Runtime Error
0
0
364
import math r = 10000 sqrt = int(math.sqrt(r)) p = [1]*r p[0] = 0 for i in range(1,sqrt): if p[i]: for j in range(2*i+1,r,i+1): p[j] = 0 while True: n = int(raw_input()) if not n: break i, num, sum = 0, 1, 0 while num < n: if p[i] == 1: num += 1 sum += i i += 1 print sum
File "/tmp/tmpcoxhsbbg/tmpo2k95old.py", line 21 print sum ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s716433912
p00053
u633068244
1393673386
Python
Python
py
Runtime Error
0
0
366
import math r = 10000 sqrt = int(math.sqrt(r)) p = [1]*r p[0] = 0 for i in range(1,sqrt): if p[i]: for j in range(2*i+1,r,i+1): p[j] = 0 while True: n = int(raw_input()) if not n: break i, num, sum = 0, 0, 0 while num < n: if p[i] == 1: num += 1 sum += i+1 i += 1 print sum
File "/tmp/tmp16gvmg20/tmpt26eypf2.py", line 21 print sum ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s214315693
p00053
u633068244
1393673478
Python
Python
py
Runtime Error
0
0
368
import math r = 100000 sqrt = int(math.sqrt(r)) p = [1]*r p[0] = 0 for i in range(1,sqrt): if p[i]: for j in range(2*i+1,r,i+1): p[j] = 0 while True: n = int(raw_input()) if not n: break i, num, sum = 0, 0, 0 while num < n: if p[i] == 1: num += 1 sum += i+1 i += 1 print sum
File "/tmp/tmp471t9383/tmp9utgtxpo.py", line 22 print sum ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s588657101
p00053
u633068244
1393674722
Python
Python
py
Runtime Error
0
0
758
import math r = 105000 sqrt = int(math.sqrt(r)) p = [1]*r p[0] = 0 for i in range(1,sqrt): if p[i]: for j in range(2*i+1,r,i+1): p[j] = 0 prime = [0 for i in ranege(10000)] j = 0 for i in range(len(p)): if p[i]: prime[j] = i+1 j += 1 while True: n = int(raw_input()) if not n: break print sum(prime[:n])import math r = 105000 sqrt = int(math.sqrt(r)) p = [1]*r p[0] = 0 for i in range(1,sqrt): if p[i]: for j in range(2*i+1,r,i+1): p[j] = 0 prime = [0 for i in ranege(10000)] j = 0 for i in range(len(p)): if p[i]: prime[j] = i+1 j += 1 while True: n = int(raw_input()) if not n: break print sum(prime[:n])
File "/tmp/tmpi72y0qwa/tmpumkqcrjy.py", line 23 print sum(prime[:n])import math ^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s878871939
p00053
u633068244
1393674755
Python
Python
py
Runtime Error
0
0
378
import math r = 105000 sqrt = int(math.sqrt(r)) p = [1]*r p[0] = 0 for i in range(1,sqrt): if p[i]: for j in range(2*i+1,r,i+1): p[j] = 0 prime = [0 for i in range(10000)] j = 0 for i in range(len(p)): if p[i]: prime[j] = i+1 j += 1 while True: n = int(raw_input()) if not n: break print sum(prime[:n])
File "/tmp/tmpkzrtqmdo/tmpvpytpct0.py", line 23 print sum(prime[:n]) ^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s576439104
p00053
u633068244
1393675013
Python
Python
py
Runtime Error
0
0
426
import math prime = [0 for i in range(11000 k = 0 r = 105000 sqrt = int(math.sqrt(r)) p = [1]*r p[0] = 0 for i in range(1,sqrt): if p[i]: prime[k] = i+1 k += 1 l = i for j in range(2*i+1,r,i+1): p[j] = 0 for i in range(l,r): if p[i]: prime[k] = i+1 k += 1 while True: n = int(raw_input()) if not n: break print sum(prime[:n])
File "/tmp/tmpk18nf6u9/tmpa9w5ztfn.py", line 3 prime = [0 for i in range(11000 ^ SyntaxError: '(' was never closed
s877735169
p00053
u633068244
1393675496
Python
Python
py
Runtime Error
0
0
389
import math sqrt = int(math.sqrt(r)) p = [1]*r p[0] = 0 for i in range(1,sqrt): if p[i]: for j in range(2*i+1,r,i+1): p[j] = 0 prime = [0 for i in range(11000)] prime[0] = 2 k = 0 for i in range(2,r): if p[i]: prime[k] = i+1+prime[k-1] k += 1 while True: n = int(raw_input()) if not n: break print sum(prime[:n])
File "/tmp/tmpaujkj9hy/tmpgfw_mdue.py", line 24 print sum(prime[:n]) ^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s523592891
p00053
u633068244
1393675543
Python
Python
py
Runtime Error
0
0
362
import math sqrt = int(math.sqrt(r)) p = [1]*r p[0] = 0 for i in range(1,sqrt): if p[i]: for j in range(2*i+1,r,i+1): p[j] = 0 s = [0 for i in range(11000)] s[0] = 2 k = 0 for i in range(2,r): if p[i]: s[k] = i+1+s[k-1] k += 1 while True: n = int(raw_input()) if not n: break print (n)
Traceback (most recent call last): File "/tmp/tmpxrczzjb7/tmpk1zh35t6.py", line 4, in <module> sqrt = int(math.sqrt(r)) ^ NameError: name 'r' is not defined
s041139850
p00053
u633068244
1393675603
Python
Python
py
Runtime Error
0
0
360
import math sqrt = int(math.sqrt(r)) p = [1]*r p[0] = 0 for i in range(1,sqrt): if p[i]: for j in range(2*i+1,r,i+1): p[j] = 0 s = [0 for i in range(11000)] s[0] = 2 k = 1 for i in range(2,r): if p[i]: s[k] = i+1+s[k-1] k += 1 while True: n = int(raw_input()) if not n: break print (n)
Traceback (most recent call last): File "/tmp/tmpij1fmpn3/tmpma9esgai.py", line 3, in <module> sqrt = int(math.sqrt(r)) ^ NameError: name 'r' is not defined
s749272748
p00053
u633068244
1393675652
Python
Python
py
Runtime Error
0
0
361
import math sqrt = int(math.sqrt(r)) p = [1]*r p[0] = 0 for i in range(1,sqrt): if p[i]: for j in range(2*i+1,r,i+1): p[j] = 0 s = [0 for i in range(11000)] s[0] = 2 k = 1 for i in range(2,r): if p[i]: s[k] = i+1+s[k-1] k += 1 while True: n = int(raw_input()) if not n: break print s(n)
File "/tmp/tmpdtdjylfw/tmp25v9twlw.py", line 23 print s(n) ^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s059134261
p00053
u633068244
1393675711
Python
Python
py
Runtime Error
0
0
363
import math sqrt = int(math.sqrt(r)) p = [1]*r p[0] = 0 for i in range(1,sqrt): if p[i]: for j in range(2*i+1,r,i+1): p[j] = 0 s = [0 for i in range(11000)] s[0] = 2 k = 1 for i in range(2,r): if p[i]: s[k] = i+1+s[k-1] k += 1 while True: n = int(raw_input()) if not n: break print s[n-1]
File "/tmp/tmp4aen4ac6/tmpmcn3ix4k.py", line 23 print s[n-1] ^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s537463771
p00053
u633068244
1393675821
Python
Python
py
Runtime Error
0
0
363
import math sqrt = int(math.sqrt(r)) p = [1]*r p[0] = 0 for i in range(1,sqrt): if p[i]: for j in range(2*i+1,r,i+1): p[j] = 0 s = [0 for i in range(11000)] s[0] = 2 k = 1 for i in range(2,r): if p[i]: s[k] = i+1+s[k-1] k += 1 while True: n = int(raw_input()) if not n: break print s[n-1]
File "/tmp/tmpkbzg499w/tmptle1ph11.py", line 23 print s[n-1] ^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s474595700
p00053
u491763171
1400469949
Python
Python
py
Runtime Error
0
0
376
def sieve(n): primes = [True] * n primes[0] = primes[1] = False for i in xrange(2, int(n ** 0.5) + 1): if primes[i]: for j in xrange(i * i, n, i): primes[j] = False return [i for i in xrange(n) if primes[i]] prime_list = sieve(200000) while 1: a = input() if a == 0: break prin t sum(prime_list[:a])
File "/tmp/tmp79f03e40/tmptk2t7bp0.py", line 16 t sum(prime_list[:a]) ^^^ SyntaxError: invalid syntax
s840300539
p00053
u436634575
1402303932
Python
Python3
py
Runtime Error
0
0
271
N = 10000 p = [1]*(N + 1) for i in range(4, N + 1, 2): p[i] = 0 a = [2] for i in range(3, N + 1, 2): if p[i] == 1: a.append(a[-1] + i) for j in range(3*i, N + 1, 2*i): p[j] = 0 while True: n = int(input()) if n == 0: break print(a[n - 1])
Traceback (most recent call last): File "/tmp/tmp_zrgdqo7/tmpfy3h94fm.py", line 11, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s334802405
p00053
u436634575
1402304294
Python
Python3
py
Runtime Error
0
0
286
N = 104723 p = [1]*(N + 1) for i in range(4, N + 1, 2): p[i] = 0 a = [2] for i in range(3, N + 1, 2): if p[i] == 1: a.append(a[-1] + i) for j in range(3*i, N + 1, 2*i): p[j] = 0 print(len(a)) while True: n = int(input()) if n == 0: break print(a[n - 1])
Traceback (most recent call last): File "/tmp/tmpqm2kgti8/tmpnf471huk.py", line 12, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
9999
s797023802
p00053
u436634575
1402304337
Python
Python3
py
Runtime Error
0
0
272
N = 104723 p = [1]*(N + 1) for i in range(4, N + 1, 2): p[i] = 0 a = [2] for i in range(3, N + 1, 2): if p[i] == 1: a.append(a[-1] + i) for j in range(3*i, N + 1, 2*i): p[j] = 0 while True: n = int(input()) if n == 0: break print(a[n - 1])
Traceback (most recent call last): File "/tmp/tmppfoacwxl/tmpj7x1j_gi.py", line 11, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s003274977
p00054
u560838141
1410783160
Python
Python
py
Runtime Error
0
0
77
sum(map(int, format(input()/float(input()), ".11f").split(".")[1])[:input()])
Traceback (most recent call last): File "/tmp/tmp172s0gl9/tmp9dheyc1v.py", line 1, in <module> sum(map(int, format(input()/float(input()), ".11f").split(".")[1])[:input()]) ^^^^^^^ EOFError: EOF when reading a line
s256719933
p00054
u744114948
1426157657
Python
Python3
py
Runtime Error
0
0
187
while True: try: a, b, n = map(int, input().split()) except: break sum = 0 s = list(str(a/b)) for i in s[2:2+n]: sum += int(i) print(sum)
s630170374
p00054
u744114948
1426157798
Python
Python3
py
Runtime Error
0
0
187
while True: try: a, b, n = map(int, input().split()) except: break sum = 0 s = list(str(a/b)) for i in s[2:2+n]: sum += int(i) print(sum)
s948480527
p00054
u744114948
1426157871
Python
Python3
py
Runtime Error
0
0
191
while True: try: a, b, n = map(int, input().split()) s = list(str(a/b)) except: break sum = 0 for i in s[2:2+n]: sum += int(i) print(sum)
s565776628
p00054
u744114948
1426157941
Python
Python3
py
Runtime Error
0
0
181
while True: try: a, b, n = map(int, input().split()) except: break s = str(a/b) sum = 0 for i in s[2:2+n]: sum += int(i) print(sum)
s941923249
p00054
u879226672
1426180178
Python
Python
py
Runtime Error
0
0
422
def f(num, i, tmp): for k in xrange(10): if k * 10**(-i) <= num - tmp < (k + 1) * 10**(-i): return k break while True: try: a,b,n = map(int,raw_input().split()) except EOFError: break a = float(a) s = 0 tmp = f(a/b,0,0) for i in range(1,n+1): val = f(a/b, i, tmp) s += val tmp += float(val * 10 ** (-i)) print s
File "/tmp/tmp7bxdaqx9/tmpl_18mbvo.py", line 20 print s ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s332775963
p00054
u879226672
1426180210
Python
Python
py
Runtime Error
0
0
445
-*- coding: utf-8 -*- def f(num, i, tmp): for k in xrange(10): if k * 10**(-i) <= num - tmp < (k + 1) * 10**(-i): return k break while True: try: a,b,n = map(int,raw_input().split()) except EOFError: break a = float(a) s = 0 tmp = f(a/b,0,0) for i in range(1,n+1): val = f(a/b, i, tmp) s += val tmp += float(val * 10 ** (-i)) print s
File "/tmp/tmp8n9huye3/tmp53m7ajmh.py", line 1 -*- coding: utf-8 -*- IndentationError: unexpected indent
s979099739
p00054
u879226672
1426180429
Python
Python
py
Runtime Error
0
0
446
# -*- coding: utf-8 -*- def f(num, i, tmp): for k in xrange(10): if k * 10**(-i) <= num - tmp < (k + 1) * 10**(-i): return k break while True: try: a,b,n = map(int,raw_input().split()) except EOFError: break a = float(a) s = 0 tmp = f(a/b,0,0) for i in range(1,n+1): val = f(a/b, i, tmp) s += val tmp += float(val * 10 ** (-i)) print s
File "/tmp/tmpqwmdenvw/tmp4t8ecbb1.py", line 21 print s ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?