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
s330510101
p00773
u015553205
1507391443
Python
Python3
py
Runtime Error
40000
7636
506
Array = [] flg = 1 while flg > 0: inp = input().split() x = int(inp[0]) y = int(inp[1]) s = int(inp[2]) flg = x**2+y**2+s**2 if flg == 0: break M = 0 for i in range(1,s-1): for j in range(1,s-1): a = int(i*(1+x/100)) b = int(j*(1+x/100)) ...
Traceback (most recent call last): File "/tmp/tmp_467xjk5/tmpbw6g023k.py", line 5, in <module> inp = input().split() ^^^^^^^ EOFError: EOF when reading a line
s749731016
p00773
u015553205
1507392306
Python
Python3
py
Runtime Error
40000
7688
540
Answer = [] flg = 1 def Taxed(p,q): T = int(p+p*q/100) return T while flg > 0: inp = input().split() x = int(inp[0]) y = int(inp[1]) s = int(inp[2]) flg = x**2+y**2+s**2 if flg == 0: break M = 0 for i in range(1,s-1): for j in range(1,s-1): a = Ta...
Traceback (most recent call last): File "/tmp/tmp7iqjp8h0/tmp763jlmoz.py", line 10, in <module> inp = input().split() ^^^^^^^ EOFError: EOF when reading a line
s913987107
p00773
u666221014
1509603670
Python
Python3
py
Runtime Error
0
0
941
#!/usr/bin/env python import sys sys.setrecursionlimit(100000) def MAX( a, b): return a if (a > b) else b def tax_calcurate( tax, left, right): return left * (100 + tax) / 100 + right * (100 + tax) / 100 def Max_Search( left, right): global Max, search_cnt, p_tax, a_tax, price tmp = 0 if left <...
Traceback (most recent call last): File "/tmp/tmp7shbssn0/tmp_4s5cv0l.py", line 27, in <module> p_tax, a_tax, price = [int(i) for i in input().split()] ^^^^^^^ EOFError: EOF when reading a line
s527814990
p00773
u666221014
1509603696
Python
Python3
py
Runtime Error
0
0
940
#!/usr/bin/env python import sys sys.setrecursionlimit(50000) def MAX( a, b): return a if (a > b) else b def tax_calcurate( tax, left, right): return left * (100 + tax) / 100 + right * (100 + tax) / 100 def Max_Search( left, right): global Max, search_cnt, p_tax, a_tax, price tmp = 0 if left <=...
Traceback (most recent call last): File "/tmp/tmpd57x0514/tmp023hg6bh.py", line 27, in <module> p_tax, a_tax, price = [int(i) for i in input().split()] ^^^^^^^ EOFError: EOF when reading a line
s443697388
p00773
u040556632
1509954691
Python
Python3
py
Runtime Error
0
0
439
while True: l = map(int, raw_input().split()) if l[0] == 0 and l[1] == 0 and l[2] == 0: break ans = 0 # p (100+x) / 100 for i in range(l[2]-1): for j in range(l[2]-1): tmp = i * (100 + l[0])/100 + j * (100 + l[0])/100 if tmp == l[2]: tmp2 = i ...
Traceback (most recent call last): File "/tmp/tmp1a9oujvs/tmpmopi4t_2.py", line 2, in <module> l = map(int, raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s643352680
p00773
u040556632
1509955854
Python
Python3
py
Runtime Error
0
0
478
while True: l = list(map(int, input().split())) if l[0] == 0 and l[1] == 0 and l[2] == 0: break ans = 0 # p (100+x) / 100 loop = l[2] * (100 + l[0])/100 for i in range(1, loop): for j in range(1, loop): tmp = i * (100 + l[0])/100 + j * (100 + l[0])/100 if...
Traceback (most recent call last): File "/tmp/tmpgyf0j5bt/tmpi31rwwkt.py", line 2, in <module> l = list(map(int, input().split())) ^^^^^^^ EOFError: EOF when reading a line
s902468958
p00773
u040556632
1509955874
Python
Python
py
Runtime Error
0
0
478
while True: l = list(map(int, input().split())) if l[0] == 0 and l[1] == 0 and l[2] == 0: break ans = 0 # p (100+x) / 100 loop = l[2] * (100 + l[0])/100 for i in range(1, loop): for j in range(1, loop): tmp = i * (100 + l[0])/100 + j * (100 + l[0])/100 if...
Traceback (most recent call last): File "/tmp/tmppm03va67/tmp6to3kwbh.py", line 2, in <module> l = list(map(int, input().split())) ^^^^^^^ EOFError: EOF when reading a line
s844729354
p00773
u878596989
1523847364
Python
Python3
py
Runtime Error
0
0
375
while True: a,b,c = map(int, input().strip().split(' ')) temp = 0 if a == 0 and b == 0 and c == 0: break for i in range(1, 1001): for j in range(1, 1001): if i*(100+a)//100 + j*(100+a)//100 == c: if temp < i*(100+b)//100 + j*(100+b)//100: t...
Traceback (most recent call last): File "/tmp/tmpv7faqw4y/tmpnpddf3no.py", line 2, in <module> a,b,c = map(int, input().strip().split(' ')) ^^^^^^^ EOFError: EOF when reading a line
s850613617
p00773
u878596989
1523847727
Python
Python3
py
Runtime Error
0
0
368
while True: a,b,c = map(int, input().strip().split(' ')) temp = 0 if a == 0 and b == 0 and c == 0: break for i in range(1, c): for j in range(1, c): if i*(100+a)//100 + j*(100+a)//100 == c: if temp < i*(100+b)//100 + j*(100+b)//100: temp = ...
Traceback (most recent call last): File "/tmp/tmpx9l46ole/tmpmg9k677a.py", line 2, in <module> a,b,c = map(int, input().strip().split(' ')) ^^^^^^^ EOFError: EOF when reading a line
s814993459
p00773
u878596989
1523848046
Python
Python3
py
Runtime Error
0
0
368
while True: a,b,c = map(int, input().strip().split(' ')) temp = 0 if a == 0 and b == 0 and c == 0: break for i in range(1, c): for j in range(1, c): if i*(100+a)//100 + j*(100+a)//100 == c: if temp < i*(100+b)//100 + j*(100+b)//100: temp = ...
Traceback (most recent call last): File "/tmp/tmpm_is_es3/tmpyon7xftj.py", line 2, in <module> a,b,c = map(int, input().strip().split(' ')) ^^^^^^^ EOFError: EOF when reading a line
s193140792
p00773
u878596989
1523848219
Python
Python3
py
Runtime Error
0
0
372
while True: a,b,c = map(int, input().strip().split(' ')) temp = 0 if a == 0 and b == 0 and c == 0: break for i in range(1, c+1): for j in range(1, c+1): if i*(100+a)//100 + j*(100+a)//100 == c: if temp < i*(100+b)//100 + j*(100+b)//100: tem...
Traceback (most recent call last): File "/tmp/tmpdxsmzkqn/tmpz393lwdj.py", line 2, in <module> a,b,c = map(int, input().strip().split(' ')) ^^^^^^^ EOFError: EOF when reading a line
s603255596
p00773
u878596989
1523849920
Python
Python3
py
Runtime Error
0
0
368
while True: a,b,c = map(int, input().strip().split(' ')) temp = 0 if a == 0 and b == 0 and c == 0: break for i in range(1, c): for j in range(1, c): if i*(100+a)//100 + j*(100+a)//100 == c: if temp < i*(100+b)//100 + j*(100+b)//100: temp = ...
Traceback (most recent call last): File "/tmp/tmp8ufwaa5n/tmposdy5y29.py", line 2, in <module> a,b,c = map(int, input().strip().split(' ')) ^^^^^^^ EOFError: EOF when reading a line
s639986710
p00773
u624914682
1523875087
Python
Python3
py
Runtime Error
0
0
316
x,y,s=map(float,input().split()) while x!=0 or y!=0 or s!=0: x=1+x/100 y=1+y/100 s=int(s) maximum=0 for i in range(s): for j in range(s): if int(i*x)+int(j*x)==s: maximum=max(maximum,int(i*y)+int(j*y)) print(maximum) x,y,s=map(float,input().split())
Traceback (most recent call last): File "/tmp/tmpmnpuw6mb/tmpjzn3yz0g.py", line 1, in <module> x,y,s=map(float,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s108230215
p00773
u624914682
1523877053
Python
Python3
py
Runtime Error
0
0
327
x,y,s=map(int,input().split()) while x!=0 or y!=0 or s!=0: x_f=(100+x)/100.0 y_f=(100+y)/100.0 maximum=0 for i in range(1,s): for j in range(i,s): if int(i*x_f)+int(j*x_f)==s: maximum=max(maximum,int(i*y_f)+int(j*y_f)) print(maximum) x,y,s=map(int,input().spl...
Traceback (most recent call last): File "/tmp/tmpme5ibaxm/tmpdfxs6rc1.py", line 1, in <module> x,y,s=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s900753980
p00773
u146816547
1524678424
Python
Python
py
Runtime Error
0
0
392
while True: x, y, s = map(int, raw_input().split()) if x == 0 and y == 0 and s == 0: break ans = 0 for i in range(1, s): for j in range(1, s): a = i * (100 + x) / 100; b = j * (100 + x) / 100; if a + b != s: continue an...
File "/tmp/tmptf7wuwzr/tmph0ptb04c.py", line 19 print ans ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s347133682
p00773
u316584871
1529221532
Python
Python3
py
Runtime Error
0
0
595
def tax(p,x): def tax(p,x): p*(100+x) // 100 def solve(x,y,s): suml = [] for a in range(1,s): for b in range(1,s): sum1 = tax(a,x) + tax(b,x) if sum1 == s: sum2 = tax(a,y) + tax(b,y) suml.append(sum2) elif sum1 > s: ...
File "/tmp/tmpndfc8m1o/tmprkkpggiv.py", line 2 def tax(p,x): ^ IndentationError: expected an indented block after function definition on line 1
s464589843
p00773
u316584871
1529221783
Python
Python3
py
Runtime Error
0
0
621
##결국 못풀어서 힌트봄 def tax(p,x): p*(100+x) // 100 def solve(x,y,s): suml = [] for a in range(1,s): for b in range(1,s): sum1 = tax(a,x) + tax(b,x) if (sum1 == s and sum1-1 =< tax(a,y) + tax(b,y)): sum2 = tax(a,y) + tax(b,y) suml.append(sum2) ...
File "/tmp/tmpci8jo2f1/tmpsrvjn_6c.py", line 10 if (sum1 == s and sum1-1 =< tax(a,y) + tax(b,y)): ^ SyntaxError: invalid syntax
s288224130
p00773
u316584871
1529223355
Python
Python3
py
Runtime Error
0
0
423
def tax(p, rate): return p*(100+rate)//100 x, y, s = map(int, input().split()) while(x != 0 or y != 0 or s != 0): sumy = [] sum_bf = int(s/(100+x)*100) for i in range(sum_bf-2, sum_bf+3): for j in range(1,i): k = i-j if(tax(k, x) + tax(j, x) == s): sumy1 =...
Traceback (most recent call last): File "/tmp/tmpe9g0cfxg/tmp9a_r_vxu.py", line 3, in <module> x, y, s = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s734316934
p00773
u316584871
1529223459
Python
Python3
py
Runtime Error
0
0
423
def tax(p, rate): return p*(100+rate)//100 x, y, s = map(int, input().split()) while(x != 0 or y != 0 or s != 0): sumy = [] sum_bf = int(s/(100+x)*100) for i in range(sum_bf-2, sum_bf+3): for j in range(1,i): k = i-j if(tax(k, x) + tax(j, x) == s): sumy1 =...
Traceback (most recent call last): File "/tmp/tmpmjkeptuu/tmp0lfg7u7_.py", line 3, in <module> x, y, s = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s450997877
p00774
u881100444
1409147114
Python
Python
py
Runtime Error
0
0
390
def calc(pp,x,y): p = 0 for i in range(1,1000): if i*(100+x)/100 == pp: p = i break return p*(100+y)/100 while True: max = 0 x,y,s = map(int,raw_input().split()) if x == 0 and y == 0 and s == 0: break for i in range(1,s): res = calc(i,x,y) + c...
File "/tmp/tmp8e5tu5xw/tmpcj6k8anu.py", line 18 print max ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s544180167
p00774
u498511622
1501672593
Python
Python3
py
Runtime Error
0
0
613
while True: lst=[] pt=0 H=int(input()) for i in range(H): lst.append(list(map(int,input().split()))) for s in lst: for s2 in range(0,3): if s[s2] != s and s[s2] == s[s2+1] == s[s2+2]: x=s[s2] pt += s[s2]*s.count(x) for h in range(0,s.count(x)): s[s.index(x)]=0 ...
Traceback (most recent call last): File "/tmp/tmpxjmnp280/tmpl1339shb.py", line 4, in <module> H=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s673279743
p00776
u332822187
1444903887
Python
Python
py
Runtime Error
0
0
1091
ans=[""] ans.pop() s="" w=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"] x=[0] x.pop() def uni(seq): seen = set() seen_add = seen.add return [ x for x in seq if x not in seen and not seen_add(x)] def check(a): global s global w n=len(a) # print...
File "/tmp/tmprl5j9_v3/tmpwwuup5vf.py", line 63 print len(ans) ^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s877132095
p00776
u260980560
1498148498
Python
Python
py
Runtime Error
40000
7884
704
import itertools while 1: s = raw_input() if s == '#': break code = [ord(c)-97 for c in s] result = set() l = len(s) for p in itertools.product([0,1], repeat=l): used = set([0, 26]) ok = 1 for i in xrange(l): k = code[i] + p[i] if p[i] == (...
File "/tmp/tmpqhnacif2/tmpblzspgz4.py", line 20 print len(result) ^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s873869811
p00776
u260980560
1498149852
Python
Python
py
Runtime Error
40000
7360
1315
import itertools from heapq import * while 1: s = raw_input() if s == '#': break code = [ord(c)-97 for c in s] l = len(s) f_que = []; l_que = [] ans = 0 for p in itertools.product([0,1], repeat=l): used = set([0, 26]) ok = 1 for i in xrange(l): k =...
File "/tmp/tmptudp06m5/tmp_f7efse2.py", line 32 print ans ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s246653115
p00777
u336892997
1467026361
Python
Python3
py
Runtime Error
40000
8644
1388
def dfs(start, frm, edges, mem): if mem[start]: return mem[start] round_trip = 0 for dest, length in edges[start]: if dest == frm: continue dfs(dest, start, edges, mem) if len(edges[dest]) == 1: round_trip += length continue rt,...
Traceback (most recent call last): File "/tmp/tmpykg8hxbc/tmpkxa665zv.py", line 64, in <module> edges = load() ^^^^^^ File "/tmp/tmpykg8hxbc/tmpkxa665zv.py", line 35, in load N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s694570757
p00777
u336892997
1467026390
Python
Python3
py
Runtime Error
40000
8720
1388
def dfs(start, frm, edges, mem): if mem[start]: return mem[start] round_trip = 0 for dest, length in edges[start]: if dest == frm: continue dfs(dest, start, edges, mem) if len(edges[dest]) == 1: round_trip += length continue rt,...
Traceback (most recent call last): File "/tmp/tmpn2m1uy56/tmpxj88k16x.py", line 64, in <module> edges = load() ^^^^^^ File "/tmp/tmpn2m1uy56/tmpxj88k16x.py", line 35, in load N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s432808305
p00777
u336892997
1467026747
Python
Python3
py
Runtime Error
40000
8776
1392
def dfs(start, frm, edges, mem): if mem[start]: return mem[start] round_trip = 0 for dest, length in edges[start]: if dest == frm: continue dfs(dest, start, edges, mem) if len(edges[dest]) == 1: round_trip += length continue rt,...
Traceback (most recent call last): File "/tmp/tmp0tdqzrwe/tmp1cfs1cpf.py", line 64, in <module> edges = load() ^^^^^^ File "/tmp/tmp0tdqzrwe/tmp1cfs1cpf.py", line 35, in load N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s175053520
p00777
u336892997
1467026917
Python
Python3
py
Runtime Error
20
7448
35
import time time.sleep(120) exit(0)
s676938739
p00777
u655168177
1467669909
Python
Python
py
Runtime Error
40000
7532
692
def calc_depth(x, k): global g, depth depth[x] = k for t in g[x].iterkeys(): if(depth[t] == -1): calc_depth(t, k + 1) def calc_dp(x): global g, depth s = 0; p = 0 for t, c in g[x].iteritems(): if depth[t] < depth[x]: continue a, b = calc_dp(t) s += 3 * c + a if a else c p = max(p, c + a - b if ...
File "/tmp/tmpw_7oxese/tmpguswevcs.py", line 36 print min(ans) ^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s106675398
p00777
u655168177
1467671435
Python
Python
py
Runtime Error
40000
7604
731
import sys sys.setrecursionlimit(10000) def calc_depth(x, k): global g, depth depth[x] = k for t in g[x].iterkeys(): if(depth[t] == -1): calc_depth(t, k + 1) def calc_dp(x): global g, depth s = 0; p = 0 for t, c in g[x].iteritems(): if depth[t] < depth[x]: continue a, b = calc_dp(t) s += 3 * c ...
File "/tmp/tmpvp293twq/tmpxd7iojh5.py", line 40 print min(ans) ^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s174431162
p00777
u072053884
1527683627
Python
Python3
py
Runtime Error
0
0
2087
def solve(): from collections import deque def dfs(start, turn=False): path = deque() path.append(start) bridge_lengths = deque() bridge_lengths.append(0) unvisited = [True] * (n + 1) unvisited[start] = False rest = core_islands_num ...
Traceback (most recent call last): File "/tmp/tmp5uib3waf/tmpc6ljv2gf.py", line 75, in <module> solve() File "/tmp/tmp5uib3waf/tmpc6ljv2gf.py", line 43, in solve file_input = open("1196_in_1", 'r')# ^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '1196_in_1'
s111053878
p00780
u575065019
1361661756
Python
Python
py
Runtime Error
19930
5260
485
MAX=2**15 a = range(MAX) a[1] = 0 for p in a: if not p: continue elif p > 100: break else: for multi in xrange(p+p, MAX, p): a[multi] = 0 ans = [] while True: n=input() sig=0 if n==0: break for i in a: if i>(n/2): break ...
File "/tmp/tmpmmzv08f1/tmp3okj92uc.py", line 29 print i ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s264136811
p00780
u575065019
1361661883
Python
Python
py
Runtime Error
19930
5260
485
MAX=33000 a = range(MAX) a[1] = 0 for p in a: if not p: continue elif p > 100: break else: for multi in xrange(p+p, MAX, p): a[multi] = 0 ans = [] while True: n=input() sig=0 if n==0: break for i in a: if i>(n/2): break ...
File "/tmp/tmpo26r27l3/tmpapmeix0d.py", line 29 print i ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s817507676
p00782
u943441430
1545791306
Python
Python3
py
Runtime Error
0
0
2762
import sys def is_contained(a, area): rx1, ry1, rx2, ry2 = a for r in area: x1, y1, x2, y2 = r if x1 <= rx1 <= x2 and x1 <= rx2 <= x2 and \ y1 <= ry1 <= y2 and y1 <= ry2 <= y2: return True return False def is_inside(x, y, rect): rx1, ry1, rx2, ry2 = rect retu...
s248536897
p00782
u943441430
1545791403
Python
Python3
py
Runtime Error
0
0
2762
import sys def is_contained(a, area): rx1, ry1, rx2, ry2 = a for r in area: x1, y1, x2, y2 = r if x1 <= rx1 <= x2 and x1 <= rx2 <= x2 and \ y1 <= ry1 <= y2 and y1 <= ry2 <= y2: return True return False def is_inside(x, y, rect): rx1, ry1, rx2, ry2 = rect retu...
s044615072
p00782
u943441430
1545791627
Python
Python3
py
Runtime Error
0
0
2762
import sys def is_contained(a, area): rx1, ry1, rx2, ry2 = a for r in area: x1, y1, x2, y2 = r if x1 <= rx1 <= x2 and x1 <= rx2 <= x2 and \ y1 <= ry1 <= y2 and y1 <= ry2 <= y2: return True return False def is_inside(x, y, rect): rx1, ry1, rx2, ry2 = rect retu...
s146060391
p00811
u731235119
1422641125
Python
Python
py
Runtime Error
19930
4436
634
import math def sieve (n): prime = [0,0] prime += [1 for i in range(n-1)] ub = math.sqrt(n) + 1 d = 2 while d <= ub: if prime[d] == 0: d += 1 continue prod = 2 while d * prod <= n: prime[d*prod] = 0 prod += 1 d += 1 return prime prime = sieve(1000) while 1: m,a,b = map(int,raw_input().split("...
File "/tmp/tmp_uqplzh0/tmpac23o5td.py", line 37 print rect_max[1], rect_max[2] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s944854016
p00811
u633068244
1423402671
Python
Python
py
Runtime Error
19920
8092
463
p = [1]*100001 p[0] = p[1] = 0 for i in range(2,int(100001**0.5)+1): if p[i]: p[2*i::i] = [0]*len(p[2*i::i]) p = [i for i in range(100001) if p[i]] while 1: m,a,b = map(int,raw_input().split()) if m == 0: break aw = ah = 2 mx = 4 for w in p: for h in p: if w*h >...
File "/tmp/tmpdppt6o46/tmpdbs7wmt9.py", line 20 print aw,ah ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s463569220
p00811
u509278866
1528183867
Python
Python3
py
Runtime Error
0
0
1698
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools sys.setrecursionlimit(10**7) inf = 10**20 eps = 1.0 / 10**10 mod = 998244353 def LI(): return [int(x) for x in sys.stdin.readline().split()] def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()] def LF...
Traceback (most recent call last): File "/tmp/tmpxyl1kpw6/tmpngol6n7t.py", line 67, in <module> print(main()) ^^^^^^ File "/tmp/tmpxyl1kpw6/tmpngol6n7t.py", line 40, in main n,a,b = LI() ^^^^^ ValueError: not enough values to unpack (expected 3, got 0)
s804054497
p00811
u104911888
1372818827
Python
Python
py
Runtime Error
20000
8248
688
import math N=100000 prime=[True]*(N+1) prime[0]=prime[1]=False for i in range(2,int(math.sqrt(N))): if prime[i]==True: j=i while i*j<=N: prime[i*j]=False j+=1 prime=[i for i in range(N+1) if prime[i]] while True: m,a,b=map(int,raw_input().split()) if m==a==b==0:brea...
File "/tmp/tmppxrx8jma/tmpb5hkr87e.py", line 27 print ans[0],ans[1] ^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s280884146
p00817
u844945939
1417911608
Python
Python3
py
Runtime Error
0
0
2791
from collections import defaultdict class UnionFind(): def __init__(self, n): self.parent = list(range(n)) self.rank = [0] * n def find(self, x): if self.parent[x] == x: return x else: self.parent[x] = self.find(self.parent[x]) return self.p...
Traceback (most recent call last): File "/tmp/tmpced49pbl/tmpyob3bvml.py", line 31, in <module> n, p1, p2 = (int(s) for s in input().split()) ^^^^^^^ EOFError: EOF when reading a line
s106352371
p00817
u586434734
1423139601
Python
Python
py
Runtime Error
0
0
4549
#! /usr/bin/python # -*- coding: utf-8 -*- def main(): # input while True: # p1:devine num. # p2:devillish num. (n, p1, p2) = map(int, raw_input().split()) if n == 0 and p1 == 0 and p2 == 0: break elif p1 == 0: print('end') [raw_input(...
Traceback (most recent call last): File "/tmp/tmpjliofect/tmp65ta5t40.py", line 171, in <module> main() File "/tmp/tmpjliofect/tmp65ta5t40.py", line 9, in main (n, p1, p2) = map(int, raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s354381883
p00817
u586434734
1423139811
Python
Python
py
Runtime Error
0
0
6741
#! /usr/bin/python # -*- coding: utf-8 -*- def main(): # input while True: # p1:devine num. # p2:devillish num. (n, p1, p2) = map(int, raw_input().split()) if n == 0 and p1 == 0 and p2 == 0: break elif p1 == 0: print('end') [raw_input(...
Traceback (most recent call last): File "/tmp/tmpp_my6pb4/tmp360dp5es.py", line 170, in <module> main() File "/tmp/tmpp_my6pb4/tmp360dp5es.py", line 9, in main (n, p1, p2) = map(int, raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s014781026
p00819
u633068244
1421853537
Python
Python
py
Runtime Error
0
0
724
for loop in range(int(raw_input())): manu = raw_input() msg = raw_input() size = len(msg) for s in manu[::-1]: if s == "J": msg = msg[-1]+msg[:-1] elif s == "C": msg = msg[1:]+msg[0] elif s == "E": msg = msg[size/2+size%2:]+msg[:size/2] ...
File "/tmp/tmpcg8qyjrb/tmpj4djqzw1.py", line 24 print msg ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s139693092
p00819
u633068244
1400323448
Python
Python
py
Runtime Error
0
0
270
R = 2**15+1 dp = [[0]*R for i in range(4)] for i in range(1,182): dp[0][i**2] += 1 for k in range(1,4): for i in range(1,182): for j in range(i**2,R-i**2): dp[k][j+i**2] += dp[k-1][j] while 1: n = input() if n == 0: break print sum(dp[i][n] for i in range(4))
File "/tmp/tmpu2cr5e8u/tmplkze8ygb.py", line 13 print sum(dp[i][n] for i in range(4)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s030429138
p00820
u731235119
1422601897
Python
Python
py
Runtime Error
19930
7068
415
from math import sqrt while 1: n = int(raw_input()) if n == 0: break ub = int(sqrt(n)) square_sum = [[0 for i in range(n+1)] for j in range(4)] for k in range(1,ub+1): square_k = k**2 square_sum[0][square_k] = 1 for j in range(3): for i in range(1, n+1 - square_k): if square_sum[j][i] >= 1: squ...
File "/tmp/tmpqc1idevz/tmpxegyw_4u.py", line 15 print sum([square_sum[j][n] for j in range(4)]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s200397957
p00820
u731235119
1422634120
Python
Python
py
Runtime Error
19920
6460
592
from math import sqrt while 1: n = int(raw_input()) if n == 0: break ub = int(sqrt(n)) square = [i**2 for i in range(1,ub+1)] square_sum =[[0 for i in range(n)] for j in range(2)] count = 0 for k in range(1,ub+1): for i in range(1,k+1): if square[k-1] + square[i-1] <= n: square_sum[0][square[k-1] + s...
Traceback (most recent call last): File "/tmp/tmpc85gypkk/tmp6rit93jc.py", line 3, in <module> n = int(raw_input()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s278690783
p00820
u506554532
1514273083
Python
Python3
py
Runtime Error
0
0
728
import math LIM = 182 def solve(n): ans = 0 for a in range(1,LIM): tmp = a*a if tmp == n: ans += 1 if tmp >= n: break for b in range(a,LIM): tmp2 = tmp + b*b if tmp2 == n: ans += 1 if tmp2 >= n: ...
Traceback (most recent call last): File "/tmp/tmpzro277jk/tmp5nfp_9j1.py", line 30, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s516833273
p00820
u506554532
1514275171
Python
Python3
py
Runtime Error
0
0
739
import math LIM = 182 def is_square(n): a = int(math.sqrt(n)) return a*a == n def solve(n): ans = 0 if is_square(n): ans += 1 for a in range(1,LIM): if a*a*2 > n: break if is_square(n - a*a): ans += 1 for b in range(a,LIM): if b*b...
Traceback (most recent call last): File "/tmp/tmppc9mm_ld/tmplkeldktp.py", line 31, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s924120299
p00820
u109084363
1361178121
Python
Python
py
Runtime Error
19930
4376
525
import sys import bisect import itertools as it square = [] i = 0 while i*i <= 2**15: square.append(i*i) i += 1 L = len(square) while True: n = int(sys.stdin.readline()) if n == 0: break count = 0 for i in xrange(L): for j in xrange(i, L): for k in xrange(j, L): ...
File "/tmp/tmp9b50u0j9/tmpcitnbrsf.py", line 26 print count ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s782626756
p00820
u109084363
1361178182
Python
Python
py
Runtime Error
19920
4384
529
import sys import bisect import itertools as it square = [] i = 0 while i*i <= 2**15: square.append(i*i) i += 1 L = len(square) while True: n = int(sys.stdin.readline()) if n == 0: break count = 0 for i in xrange(L): for j in xrange(i, L): for k in xrange(j, L): ...
File "/tmp/tmporoz5ex8/tmpnsik563f.py", line 26 print count ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s906549423
p00820
u109084363
1361178261
Python
Python
py
Runtime Error
19930
4316
505
import sys import bisect square = [] i = 0 while i*i <= 2**15: square.append(i*i) i += 1 L = len(square) while True: n = int(sys.stdin.readline()) if n == 0: break count = 0 for i in xrange(L): for j in xrange(i, L): for k in xrange(j, L): v = n - s...
File "/tmp/tmp8ylqv7xx/tmp0b1i3ekk.py", line 24 print count ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s973888347
p00820
u104911888
1372836887
Python
Python
py
Runtime Error
20000
4504
454
import math while True: n=input() if n==0:break S=set() P=set([i*i for i in range(182)]) for i in range(182): if i>n:break for j in range(182): if i+j>n:break for k in range(182): if i+j+k>n:break if n-32761<=i*i+j*j+k*k<=n and ((n-(i*i+j*j+k*k)) in P): ...
File "/tmp/tmpavfx_yhm/tmpfo1skqs_.py", line 8 if i>n:break TabError: inconsistent use of tabs and spaces in indentation
s457865180
p00820
u104911888
1372839757
Python
Python
py
Runtime Error
20000
4224
345
while True: n=input() if n==0:break cnt=0 for i in range(182): if i*i>n:break for j in range(i,182): if i*i+j*j>n:break for k in range(j,182): if i*i+j*j+k*k>n:break for l in range(k,182): if i*i+j*j+k*k+l*l>n:break if i*i+j*j+k*k+l*l...
File "/tmp/tmp5imbbo0w/tmpe_28vrn2.py", line 6 if i*i>n:break TabError: inconsistent use of tabs and spaces in indentation
s303717984
p00826
u072053884
1540988809
Python
Python3
py
Runtime Error
0
0
2974
def string_to_complex(s): a, b, c, d = map(int, s.split()) return (a + b * 1j, c + d * 1j) def dot(c1, c2): return c1.real * c2.real + c1.imag * c2.imag def cross(c1, c2): return c1.real * c2.imag - c1.imag * c2.real def cross_point(p1, p2, p3, p4): crs1 = cross(p2 - p1, p3 - p1) crs2 = cross...
Traceback (most recent call last): File "/tmp/tmp348pjszd/tmpyoebsf8e.py", line 105, in <module> solve() File "/tmp/tmp348pjszd/tmpyoebsf8e.py", line 62, in solve file_input = stdin.radlines() ^^^^^^^^^^^^^^ AttributeError: '_io.TextIOWrapper' object has no attribute 'radlines'. Did you mea...
s625066012
p00826
u072053884
1540988918
Python
Python3
py
Runtime Error
0
0
2975
def string_to_complex(s): a, b, c, d = map(int, s.split()) return (a + b * 1j, c + d * 1j) def dot(c1, c2): return c1.real * c2.real + c1.imag * c2.imag def cross(c1, c2): return c1.real * c2.imag - c1.imag * c2.real def cross_point(p1, p2, p3, p4): crs1 = cross(p2 - p1, p3 - p1) crs2 = cross...
Traceback (most recent call last): File "/tmp/tmpw8wk45k0/tmp6gmyawym.py", line 105, in <module> solve() File "/tmp/tmpw8wk45k0/tmp6gmyawym.py", line 67, in solve n = int(lines[0]) ^^^^^ NameError: name 'lines' is not defined
s979389121
p00828
u621997536
1435324078
Python
Python3
py
Runtime Error
19930
6804
1308
dx = [1, 1, 0, -1, 0, 0, 0, 0, 1, 1, 0, -1, 1, 1, 0, -1, 1, 1, 0, -1] dy = [0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1] dz = [0, 0, 0, 0, 1, 1, 0, -1, 0, 1, 1, 1, 1, 1, 0, -1, 1, 1, 0, -1] def check(i, col, x, y, z): if not(0 <= x < n and 0 <= y < n and 0 <= z < n): return 0 if col != ...
Traceback (most recent call last): File "/tmp/tmpymqfjz9u/tmpcs_tp1gb.py", line 16, in <module> n, m, p = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s869723653
p00836
u546285759
1491645756
Python
Python3
py
Runtime Error
0
0
546
primes = [0, 0] + [1]*996 for i in range(2, 32): if primes[i]: for j in range(i*i, 998, i): primes[j] = 0 while True: n = int(input()) if n == 0: break m = n while not primes[m]: m -= 1 pnum = [i for i in range(m+1) if primes[i]] ans = 0 for i in range...
Traceback (most recent call last): File "/tmp/tmpgq15c4kr/tmpagz5d93y.py", line 7, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s453626675
p00836
u546285759
1491645806
Python
Python3
py
Runtime Error
0
0
547
primes = [0, 0] + [1]*999 for i in range(2, 32): if primes[i]: for j in range(i*i, 1001, i): primes[j] = 0 while True: n = int(input()) if n == 0: break m = n while not primes[m]: m -= 1 pnum = [i for i in range(m+1) if primes[i]] ans = 0 for i in rang...
Traceback (most recent call last): File "/tmp/tmpp65oy2pk/tmpgxk5zn78.py", line 7, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s681320744
p00836
u947762778
1509907373
Python
Python3
py
Runtime Error
0
0
554
import math isPrime = [1 for _ in range (10002)] isPrime[:2] = [0, 0] for i in range(2, 101): for j in range(i*i, 10001, i): isPrime[j] = 0 prime = [] for i in range(10001): if isPrime[i] == 1: prime.append(i) while True: n = int(input()) if n == 0: break cnt = 0 for i in...
Traceback (most recent call last): File "/tmp/tmpags4ic4p/tmpqvy05kqk.py", line 12, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s622627849
p00836
u947762778
1509907455
Python
Python3
py
Runtime Error
0
0
546
import math isPrime = [1 for _ in range (10002)] isPrime[:2] = [0, 0] for i in range(2, 101): for j in range(i*i, 10001, i): isPrime[j] = 0 prime = [] for i in range(10001): if isPrime[i] == 1: prime.append(i) while True: n = int(input()) if n == 0: break cnt = 0 for i in...
Traceback (most recent call last): File "/tmp/tmpay7_5v19/tmpb8zc_hen.py", line 12, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s532963934
p00836
u633068244
1400221245
Python
Python
py
Runtime Error
0
0
406
r = 100001 p = [1]*r p[0] = p[1] = 0 for i in range(int(r**0.5)): if p[i]: p[2*i::i] = [0 for x in range(2*i,r,i)] prime = [] for i in range(r): if p[i]: prime.append(i) while 1: n = int(raw_input()) if n == 0: break ans = 0 i = 0 while 1: s = 0 j = i while 1: s += prime[j] if s >= n: if s ==...
File "/tmp/tmpsbub3rb5/tmp08ovjksw.py", line 29 print ans ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s324953152
p00848
u078042885
1485800330
Python
Python3
py
Runtime Error
0
0
358
for i in range(2,1201): for j in range(2,int(i**0.5)+1): if not i%j:break else:p+=[i] dp=[[0]*1200 for _ in range(15)] dp[0][0]=1 for x,y in enumerate(p): for i in range(min(x+1,14),0,-1): for j in range(p[x],1200): dp[i][j]+=dp[i-1][j-y] while 1: n,k=map(int,input().split())...
Traceback (most recent call last): File "/tmp/tmp3e21ov02/tmpiok5fg69.py", line 4, in <module> else:p+=[i] ^ NameError: name 'p' is not defined
s682492228
p00848
u633068244
1400222274
Python
Python
py
Runtime Error
39870
4424
498
r = 1500 p = [1]*r p[0] = p[1] = 0 for i in range(int(r**0.5)): if p[i]: p[2*i::i] = [0 for x in range(2*i,r,i)] prime = [] for i in range(r): if p[i]: prime.append(i) def solve(n,k,i): if k == 0: return 1 if n == 0 else 0 if n-k*prime[i] < 0 : return 0 res = 0 res += solve(n-prime[i],k-1,i+1) + solve(n,k,i+1)...
File "/tmp/tmp7upoxb2n/tmpuczpy848.py", line 25 print ans ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s660092602
p00848
u633068244
1400222344
Python
Python
py
Runtime Error
39870
4688
478
r = 10000 p = [1]*r p[0] = p[1] = 0 for i in range(int(r**0.5)): if p[i]: p[2*i::i] = [0 for x in range(2*i,r,i)] prime = [] for i in range(r): if p[i]: prime.append(i) def solve(n,k,i): if k == 0: return 1 if n == 0 else 0 if n-k*prime[i] < 0 : return 0 return solve(n-prime[i],k-1,i+1) + solve(n,k,i+1) while ...
File "/tmp/tmpxis8eb13/tmp4i6k_f7k.py", line 23 print ans ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s506478136
p00855
u617183767
1421160238
Python
Python
py
Runtime Error
0
0
1046
#! /usr/bin/env python # -*- coding: utf-8 -*- import os import sys import itertools import math from collections import Counter, defaultdict class Main(object): def __init__(self): pass def solve(self): ''' insert your code ''' prime = self.sieve(1299709) ...
File "/tmp/tmp4k3pk7wx/tmpgj6il7wn.py", line 23 print 0 ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s842635085
p00855
u316268279
1421978802
Python
Python3
py
Runtime Error
19920
17172
818
#!/usr/bin/env python # -*- coding: utf-8 -*- import math def sieve_of_erastosthenes(num): input_list = [False if i % 2 == 0 or i % 3 == 0 or i % 5 == 0 else True for i in range(num)] input_list[0] = input_list[1] = False input_list[2] = input_list[3] = input_list[5] = True sqrt = math.sqrt(num) ...
Traceback (most recent call last): File "/tmp/tmpyxlwu1oq/tmpymkgbtuf.py", line 21, in <module> k = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s613356741
p00855
u316268279
1421979196
Python
Python3
py
Runtime Error
19930
17172
820
#!/usr/bin/env python # -*- coding: utf-8 -*- import math def sieve_of_erastosthenes(num): input_list = [False if i % 2 == 0 or i % 3 == 0 or i % 5 == 0 else True for i in range(num)] input_list[0] = input_list[1] = False input_list[2] = input_list[3] = input_list[5] = True sqrt = math.sqrt(num) ...
Traceback (most recent call last): File "/tmp/tmpzuwf1m8d/tmph9y4igax.py", line 21, in <module> k = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s934008060
p00864
u467175809
1530999651
Python
Python
py
Runtime Error
0
0
373
while True: n, w = map(int, raw_input().split()) if n == 0: break lst = [] for i in range(n): num = input() num /= w lst.append(num) ans = 0.0 cnt = [0 for i in range(100)] for i in range(n): num = max_num - lst[i] ans += num cnt[num] ...
File "/tmp/tmp605so_88/tmp0oxzkw71.py", line 18 print ans / max(lst) / max(cnt) + 0.01 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s780870987
p00864
u633068244
1422350998
Python
Python
py
Runtime Error
0
0
284
while 1: n,w = map(int,raw_input().split()) if n == 0: break v = [0]*10 m = 0 for i in range(n): p = int(raw_input())/w v[p] += 1 m = max(m,p) ans = 0.01 for i in range(10): ans += (v[i]*1.0/max(v))*(1-i*1.0/m) print ans
File "/tmp/tmphtxvnedq/tmpc7zs89p7.py", line 13 print ans ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s816861213
p00864
u120360464
1438245581
Python
Python
py
Runtime Error
0
0
404
#! /usr/bin/python # -*- coding: utf-8 -*- while True: (n, w) = map(int, raw_input().split()) if n == 0: break vcnt = [0]*10 vr = 0 for i in range(n): v = int(raw_input()) if v/w > vr: vr = v/w vcnt[v/w] += 1 vmax = max(vcnt) ans = 0 for i in ra...
File "/tmp/tmpotbl7nlo/tmps2jjy24k.py", line 21 print ans+0.01 ^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s177821584
p00864
u506554532
1514182228
Python
Python3
py
Runtime Error
0
0
404
while True: N,W = map(int,input().split()) if N == 0: break src = [int(input()) for i in range(N)] highest = max(src) bands = highest//W + 1 hist = [0 for i in range(bands)] for i in range(N): hist[src[i] // W] += 1 ans = maxn = 0 for i,n in enumerate(hist): ans += n ...
File "/tmp/tmp1ohs4chp/tmp3etwmu88.py", line 14 print(ans * / maxn / (bands-1) + 0.01) ^ SyntaxError: invalid syntax
s330013823
p00864
u672443148
1517109438
Python
Python3
py
Runtime Error
0
0
674
from heapq import * def calcInk(wdt,val): maxval=val[-1] histnum=maxval//wdt hist=[] for i in range(histnum+1): hist.append([]) vl=len(val) for i in range(vl): v=heappop(val) hist[v//wdt].append(v) highest=0 for i in range(len(hist)): highest=max(hig...
Traceback (most recent call last): File "/tmp/tmp1gdyh_na/tmpm0nyh4s_.py", line 24, in <module> n,w=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s884966133
p00864
u672443148
1517109473
Python
Python3
py
Runtime Error
0
0
674
from heapq import * def calcInk(wdt,val): maxval=val[-1] histnum=maxval//wdt hist=[] for i in range(histnum+1): hist.append([]) vl=len(val) for i in range(vl): v=heappop(val) hist[v//wdt].append(v) highest=0 for i in range(len(hist)): highest=max(hig...
Traceback (most recent call last): File "/tmp/tmptl2769n2/tmpe9dnpphp.py", line 24, in <module> n,w=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s545576882
p00864
u672443148
1517109537
Python
Python3
py
Runtime Error
0
0
673
from heapq import * def calcInk(wdt,val): maxval=val[-1] histnum=maxval//wdt hist=[] for i in range(histnum+1): hist.append([]) vl=len(val) for i in range(vl): v=heappop(val) hist[v//wdt].append(v) highest=0 for i in range(len(hist)): highest=max(hig...
Traceback (most recent call last): File "/tmp/tmp867oothb/tmpmvvinpyx.py", line 24, in <module> n,w=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s180167044
p00864
u672443148
1517109779
Python
Python3
py
Runtime Error
0
0
673
from heapq import * def calcInk(wdt,val): maxval=val[-1] histnum=maxval//wdt hist=[] for i in range(histnum+1): hist.append([]) vl=len(val) for i in range(vl): v=heappop(val) hist[v//wdt].append(v) highest=0 for i in range(len(hist)): highest=max(hig...
Traceback (most recent call last): File "/tmp/tmp2v6jqvbk/tmpbs462o1g.py", line 24, in <module> n,w=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s265028878
p00864
u672443148
1517109986
Python
Python3
py
Runtime Error
0
0
689
from heapq import * def calcInk(wdt,val): maxval=val[-1] histnum=maxval//wdt hist=[] for i in range(histnum+1): hist.append([]) vl=len(val) for i in range(vl): v=heappop(val) hist[v//wdt].append(v) highest=0 for i in range(len(hist)): highest=max(hig...
Traceback (most recent call last): File "/tmp/tmp53qlak2s/tmpepfs55pz.py", line 24, in <module> n,w=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s732539893
p00864
u672443148
1517110285
Python
Python3
py
Runtime Error
0
0
646
if __name__=='__main__': while True: n,w=map(int,input().split()) if n==w==0: break V=[] for _ in range(n): heappush(V,int(input())) maxV=V[-1] histnum=maxV//w hist=[] for i in range(histnum+1): hist.append([]) ...
Traceback (most recent call last): File "/tmp/tmplicp2req/tmp5srv8eqd.py", line 3, in <module> n,w=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s512846069
p00864
u672443148
1517110764
Python
Python3
py
Runtime Error
0
0
674
from heapq import * def calcInk(wdt,val): maxval=val[-1] histnum=maxval//wdt hist=[] for i in range(histnum+1): hist.append([]) vl=len(val) for i in range(vl): v=heappop(val) hist[v//wdt].append(v) highest=0 for i in range(len(hist)): highest=max(hig...
Traceback (most recent call last): File "/tmp/tmp_tukw7x8/tmp0d3dgpzh.py", line 24, in <module> n,w=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s689680767
p00864
u104911888
1372855136
Python
Python
py
Runtime Error
0
0
301
while True: n,w=map(int,raw_input().split()) if n==w==0:break L=[0]*n for i in range(n): v=input() L[v/w]+=1 maxh=max(L) r=n-1 while r>0 and L[r]==0: r-=1 ink=0.01 for i in range(r+1): ink+=float(r-i)/r*float(L[i])/maxh print ink
File "/tmp/tmpy31zg_mh/tmpso2t3llp.py", line 15 print ink ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s700808864
p00864
u104911888
1372855198
Python
Python
py
Runtime Error
0
0
305
while True: n,w=map(int,raw_input().split()) if n==w==0:break L=[0]*(n+1) for i in range(n): v=input() L[v/w]+=1 maxh=max(L) r=n-1 while r>0 and L[r]==0: r-=1 ink=0.01 for i in range(r+1): ink+=float(r-i)/r*float(L[i])/maxh print ink
File "/tmp/tmp066vsya4/tmpee3kazz3.py", line 15 print ink ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s939647203
p00864
u104911888
1372855284
Python
Python
py
Runtime Error
0
0
301
while True: n,w=map(int,raw_input().split()) if n==w==0:break L=[0]*w for i in range(n): v=input() L[v/w]+=1 maxh=max(L) r=n-1 while r>0 and L[r]==0: r-=1 ink=0.01 for i in range(r+1): ink+=float(r-i)/r*float(L[i])/maxh print ink
File "/tmp/tmp8f9ip9kh/tmps3h6a4ce.py", line 15 print ink ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s150956865
p00864
u104911888
1372855320
Python
Python
py
Runtime Error
0
0
305
while True: n,w=map(int,raw_input().split()) if n==w==0:break L=[0]*(w+1) for i in range(n): v=input() L[v/w]+=1 maxh=max(L) r=n-1 while r>0 and L[r]==0: r-=1 ink=0.01 for i in range(r+1): ink+=float(r-i)/r*float(L[i])/maxh print ink
File "/tmp/tmpk01cg9bh/tmpr23rcxma.py", line 15 print ink ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s466575085
p00864
u104911888
1372855463
Python
Python
py
Runtime Error
0
0
328
while True: n,w=map(int,raw_input().split()) if n==w==0:break L=[0]*(w+1) for i in range(n): v=input() L[v/w]+=1 maxh=max(L) r=n-1 while r>0 and L[r]==0: r-=1 ink=0.01 for i in range(r+1): p=float(r-i)/r ink+=float(r-i)/r*float(L[i])/maxh p...
File "/tmp/tmpf94zh818/tmppp_mnsrl.py", line 16 print ink ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s040641488
p00864
u104911888
1372855632
Python
Python
py
Runtime Error
0
0
362
while True: n,w=map(int,raw_input().split()) if n==w==0:break L=[0]*(w+1) for i in range(n): v=input() L[v/w]+=1 maxh=max(L) r=n-1 while r>0 and L[r]==0: r-=1 ink=0.01 for i in range(r+1): if r<>0: ink+=float(r-i)/r*float(L[i])/maxh ...
File "/tmp/tmpxqiies6y/tmp4h5q6wi0.py", line 14 if r<>0: ^^ SyntaxError: invalid syntax
s145246727
p00864
u104911888
1372855676
Python
Python
py
Runtime Error
0
0
362
while True: n,w=map(int,raw_input().split()) if n==w==0:break L=[0]*(w+1) for i in range(n): v=input() L[v/w]+=1 maxh=max(L) r=n-1 while r>0 and L[r]==0: r-=1 ink=0.01 for i in range(r+1): if r<>0: ink+=float(r-i)/r*float(L[i])/maxh ...
File "/tmp/tmpltnav1g5/tmpvs8u14sw.py", line 14 if r<>0: ^^ SyntaxError: invalid syntax
s038100916
p00874
u880042992
1409635286
Python
Python3
py
Runtime Error
0
0
949
#include <iostream> #include <algorithm> using namespace std; #define repeat(i,n) for (int i = 0; i < (n); ++i) #define MAX_W 10 #define MAX_D 10 int main() { while (true) { int W, D; cin >> W >> D; if (W == 0 or D == 0) break; static int HW[MAX_W], HD[MAX_D]; repeat (w,W) cin >> HW[...
File "/tmp/tmp2gyh_vpa/tmppw5fh9nz.py", line 3 using namespace std; ^^^^^^^^^ SyntaxError: invalid syntax
s966173340
p00875
u633068244
1424611236
Python
Python
py
Runtime Error
19930
5640
416
while 1: n = int(raw_input()) if n == 0: break ab = [raw_input().split() for i in xrange(n)] s = raw_input() g = raw_input() que = [[s,0]] while que: c,i = que.pop(0) if c == g: print i break for a,b in ab: cc = c.replace(a,b) ...
File "/tmp/tmpluzg0tz9/tmprdy2ttpb.py", line 11 print i ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s851333172
p00875
u509278866
1529904755
Python
Python3
py
Runtime Error
0
0
2423
// C++11 #include "bits/stdc++.h" #include <sys/time.h> #include <emmintrin.h> #include <string> #include <sstream> #include <fstream> #include <random> #include <bitset> using namespace std; inline long long GetTSC() { long long lo, hi; asm volatile ("rdtsc": "=a"(lo), "=d"(hi)); return lo + (hi << 32); } inli...
File "/tmp/tmpuawagdqh/tmpazxik5_0.py", line 1 // C++11 ^^ SyntaxError: invalid syntax
s799826733
p00881
u844945939
1412806908
Python
Python3
py
Runtime Error
19930
73088
782
from collections import Counter while True: m, n = (int(s) for s in input().split()) if not m: break objs = [int(input(), 2) for i in range(n)] f = [[0 for i in range(1 << m)] for i in range(1 << m)] for mask in reversed(range(1<<m)): s = Counter(obj & mask for obj in objs) ...
Traceback (most recent call last): File "/tmp/tmpmnyen90t/tmpcb4gti8h.py", line 4, in <module> m, n = (int(s) for s in input().split()) ^^^^^^^ EOFError: EOF when reading a line
s286784543
p00881
u844945939
1412937427
Python
Python3
py
Runtime Error
0
0
595
while True: m, n = (int(s) for s in input().split()) if not m: break objs = [int(input(), 2) for i in range(n)] dp = [[0] * (1<<m) for i in range(1 << m)] bits = [1 << i for i in range(m)] for mask in reversed(range(1 << m)): s = Counter(obj & mask for obj in objs) for ...
Traceback (most recent call last): File "/tmp/tmpw8zhc2lw/tmp90od0hz6.py", line 2, in <module> m, n = (int(s) for s in input().split()) ^^^^^^^ EOFError: EOF when reading a line
s551946320
p00881
u844945939
1412937966
Python
Python
py
Runtime Error
0
0
602
while True: m, n = (int(s) for s in raw_input().split()) if not m: break objs = [int(raw_input(), 2) for i in range(n)] dp = [[0] * (1<<m) for i in range(1 << m)] bits = [1 << i for i in range(m)] for mask in reversed(range(1 << m)): s = Counter(obj & mask for obj in objs) ...
File "/tmp/tmpqoebc1__/tmpblrk688p.py", line 17 print dp[0][0] ^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s381647444
p00884
u011621222
1422508262
Python
Python3
py
Runtime Error
19930
6744
800
def get_group(str): return str.split(':')[0]; def get_member(str): return str.split(':')[1].split('.')[0].split(','); def get_num(group, map, ans): for person in map[group]: if person in map: get_num(person, map, ans); else: ans[person] = True; def main(): wh...
Traceback (most recent call last): File "/tmp/tmp5del6110/tmps2bhhpq0.py", line 41, in <module> main(); ^^^^^^ File "/tmp/tmp5del6110/tmps2bhhpq0.py", line 18, in main str = input(); ^^^^^^^ EOFError: EOF when reading a line
s944033769
p00884
u011621222
1422508879
Python
Python3
py
Runtime Error
19920
6744
842
def get_group(str): return str.split(':')[0]; def get_member(str): return str.split(':')[1].split('.')[0].split(','); def get_num(group, map, ans): for person in map[group]: if person in map: get_num(person, map, ans); else: ans[person] = True; def main(): while T...
Traceback (most recent call last): File "/tmp/tmpsyvp9l7g/tmp_4f_x6_3.py", line 33, in <module> main(); ^^^^^^ File "/tmp/tmpsyvp9l7g/tmp_4f_x6_3.py", line 13, in main str = input(); ^^^^^^^ EOFError: EOF when reading a line
s873494609
p00884
u260980560
1432476398
Python
Python
py
Runtime Error
19930
4312
630
def dfs(dg, gs, ms, v): me = ms[v] for i in xrange(len(me)): if me[i] in dg: ret = dfs(dg, gs, ms, gs.index(me[i])) for e in ret: if e not in dg[gs[v]]: dg[gs[v]].append(e) else: if me[i] not in dg[gs[v]]: dg...
File "/tmp/tmpbz2yjx_l/tmpa_c54_vx.py", line 26 print len(dg[gs[0]]) ^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s534619500
p00884
u063091489
1432705528
Python
Python3
py
Runtime Error
0
0
608
from django.template.defaultfilters import first while True: N = int(input()) if N == 0: break first_group_menbers = set(input()[:-1].split(":")[1].split(",")) d = {} for i in range(N-1): group, members = input()[:-1].split(":") d[group] = set(members.split(",")) ...
Traceback (most recent call last): File "/tmp/tmpkdjh096y/tmp803i7xkd.py", line 4, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s466970026
p00884
u063091489
1432705574
Python
Python3
py
Runtime Error
0
0
608
from django.template.defaultfilters import first while True: N = int(input()) if N == 0: break first_group_menbers = set(input()[:-1].split(":")[1].split(",")) d = {} for i in range(N-1): group, members = input()[:-1].split(":") d[group] = set(members.split(",")) ...
Traceback (most recent call last): File "/tmp/tmpkc0ao41t/tmpqjq6hgo8.py", line 4, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s618540673
p00884
u633068244
1399614097
Python
Python
py
Runtime Error
0
0
416
while 1: n = input() if n == 0: break ans = {} for i in range(n): group,name = raw_input().split(":") if i == 0: first = group ans[group] = set(name[:-1].split(",")) while 1: for key in ans: for key1 in ans: if key in ans[key1]: ans[key1] |= ans[key] ans[key1].discard(key) del ...
File "/tmp/tmp6i_egnsz/tmp584xl444.py", line 21 print len(ans[first]) ^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s293547529
p00884
u633068244
1399614136
Python
Python
py
Runtime Error
0
0
416
while 1: n = input() if n == 0: break ans = {} for i in range(n): group,name = raw_input().split(":") if i == 0: first = group ans[group] = set(name[:-1].split(",")) while 1: for key in ans: for key1 in ans: if key in ans[key1]: ans[key1] |= ans[key] ans[key1].discard(key) del ...
File "/tmp/tmpv6kpvv07/tmpbbhp346e.py", line 21 print len(ans[first]) ^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s026741598
p00884
u633068244
1399614371
Python
Python
py
Runtime Error
0
0
434
while 1: n = input() if n == 0: break ans = {} for i in range(n): group,name = raw_input().split(":") if i == 0: first = group ans[group] = set(name[:-1].split(",")) while 1: for key in ans: for key1 in ans: if key in ans[key1]: ans[key1] |= ans[key] ans[key1].discard(key) del ...
File "/tmp/tmp1c5vcd7l/tmpu8kzrrl2.py", line 22 print len(ans[first]) ^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?