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
s942051716
p01371
u109084363
1361955653
Python
Python
py
Runtime Error
19930
4616
749
import sys import collections sys.setrecursionlimit(10000) while True: N = int(raw_input()) if N == 0: break time = [] for i in xrange(N): time.append(map(int, raw_input().split())) def dp(state): L = len(state) if L <= 1: return time[state[0]][0] ...
File "/tmp/tmpvk1fs_4o/tmpqppz5vm4.py", line 31 print dp(state) ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s478974746
p01371
u109084363
1362900710
Python
Python
py
Runtime Error
20000
4612
719
import sys import collections while True: N = int(raw_input()) if N == 0: break time = [] for i in xrange(N): time.append(map(int, raw_input().split())) def dp(state): L = len(state) if L <= 1: return time[state[0]][0] else: temp...
File "/tmp/tmpdt418itw/tmpztsghaul.py", line 29 print dp(state) ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s643058756
p01371
u109084363
1362902300
Python
Python
py
Runtime Error
20000
4616
723
import sys import collections while True: N = int(raw_input()) if N == 0: break time = [] for i in xrange(N): time.append(map(int, raw_input().split())) def dp(state): L = len(state) if L <= 1: return time[state[0]][0] else: temp...
File "/tmp/tmpnw0x4ckf/tmp3gi0pzs8.py", line 29 print dp(state) ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s932863322
p01371
u109084363
1362903237
Python
Python
py
Runtime Error
20000
18300
869
import sys import collections while True: N = int(raw_input()) if N == 0: break time = [] for i in xrange(N): time.append(map(int, raw_input().split())) memo = {} def dp(state): if tuple(state) in memo: return memo[tuple(state)] L = len...
File "/tmp/tmpbyblg1my/tmpuzags1nx.py", line 34 print dp(state) ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s146657557
p01376
u633068244
1398863452
Python
Python
py
Runtime Error
0
0
93
print max([sum(map(int,raw_input().split())) for i in range(map(int,raw_input().split())[0])]
File "/tmp/tmp3iupof24/tmp1b0coyjo.py", line 1 print max([sum(map(int,raw_input().split())) for i in range(map(int,raw_input().split())[0])] ^ SyntaxError: '(' was never closed
s294866696
p01379
u586434734
1422635421
Python
Python
py
Runtime Error
80
28644
2382
#!/usr/bin/python # -*- coding: utf-8 -*- from random import random import sys # 再帰の最大回数を設定 LIMIT = 100000 sys.setrecursionlimit(LIMIT) LEFT = (-1, 0) RIGHT = (1, 0) UP = (0, -1) DOWN = (0, 1) NONE = (0, 0) def main(): # 入力 (R, C) = map(int, raw_input().split()) data = [raw_input() for x in xrange(R)] ...
Traceback (most recent call last): File "/tmp/tmpaa7cvf1m/tmpuiegd30c.py", line 105, in <module> main() File "/tmp/tmpaa7cvf1m/tmpuiegd30c.py", line 19, in main (R, C) = map(int, raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s744630600
p01379
u586434734
1422636360
Python
Python
py
Runtime Error
80
28376
2397
#!/usr/bin/python # -*- coding: utf-8 -*- from random import random import sys # 再帰の最大回数を設定 LIMIT = 100000 sys.setrecursionlimit(LIMIT) LEFT = (-1, 0) RIGHT = (1, 0) UP = (0, -1) DOWN = (0, 1) NONE = (0, 0) def main(): # 入力 (R, C) = map(int, raw_input().split()) data = [raw_input() for x in xrange(R)] ...
Traceback (most recent call last): File "/tmp/tmpahrmdda_/tmp1vjzq9d0.py", line 105, in <module> main() File "/tmp/tmpahrmdda_/tmp1vjzq9d0.py", line 19, in main (R, C) = map(int, raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s884227934
p01379
u724548524
1526783298
Python
Python3
py
Runtime Error
1850
8244
1251
import random h, w = map(int, input().split()) area = [input() for _ in range(h)] xyds = [[0, 0, 1, 0, 0]] for _ in range(1000000): for xyd in xyds: x = xyd[0] y = xyd[1] if area[y][x] == "<":xyd[2], xyd[3] = -1, 0 elif area[y][x] == ">":xyd[2], xyd[3] = 1, 0 elif area[y][x] ...
Traceback (most recent call last): File "/tmp/tmp2nivduu_/tmpaf2cpjjd.py", line 2, in <module> h, w = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s668580308
p01379
u724548524
1526783340
Python
Python3
py
Runtime Error
1830
8244
1261
import random h, w = map(int, input().split()) area = [input() for _ in range(h)] xyds = [[0, 0, 1, 0, 0]] for _ in range(1000000): for xyd in xyds: x = xyd[0] y = xyd[1] if area[y][x] == "<":xyd[2], xyd[3] = -1, 0 elif area[y][x] == ">":xyd[2], xyd[3] = 1, 0 elif area[y][x] ...
Traceback (most recent call last): File "/tmp/tmp7yz1jhq_/tmpuhxrjos7.py", line 2, in <module> h, w = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s463173876
p01386
u019169314
1529576138
Python
Python3
py
Runtime Error
240
5640
1289
# n=nodes, m=edges n,m = map(int, input().split()) neighborCost = {i: dict() for i in range(1,n+1)} fullCost = {i: float('inf') for i in range(1,n+1)} fullCost[1] = 0 for i in range(m): fro, to, cost = map(int, input().split()) try: if cost < neighborCost[fro][to]: neighborCost[fro][to] = co...
Traceback (most recent call last): File "/tmp/tmpf02oo5gq/tmprhfn3mwc.py", line 2, in <module> n,m = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s230396740
p01386
u019169314
1529761650
Python
Python3
py
Runtime Error
160
6324
1287
import functools as fn import time from collections import defaultdict # n=nodes, m=edges n,m = map(int, input().split()) graph = defaultdict(lambda: defaultdict(lambda: None)) for i in range(m): fro, to, cost = map(int, input().split()) if graph[fro][to] is None or graph[fro][to] > cost: graph[fro][to]...
Traceback (most recent call last): File "/tmp/tmp8pytrt3g/tmpmi35u5mu.py", line 5, in <module> n,m = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s974248494
p01388
u633068244
1414922596
Python
Python
py
Runtime Error
0
0
47
print min(raw_input().count(i) for i in "KUPC")
File "/tmp/tmp9nc7hk4g/tmp59oj3k_3.py", line 1 print min(raw_input().count(i) for i in "KUPC") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s860234184
p01388
u073628131
1477965469
Python
Python3
py
Runtime Error
0
0
217
# coding: utf-8 s = raw_input(); k = u = p = c = 0; for a in s: if a == 'K': k += 1; if a == 'U': u += 1; if a == 'P': p += 1; if a == 'C': c += 1; print min(k,u,p,c);
File "/tmp/tmpeiox1pba/tmplrhegvgd.py", line 15 print min(k,u,p,c); ^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s388117273
p01390
u352394527
1546142990
Python
Python3
py
Runtime Error
0
0
424
dic = {} for num1 in range(ord("a"), ord("z") + 1): c1 = chr(num1) dic[c1] = [] for num2 in range(ord("a"), ord("z") + 1): c2 = chr(num2) for num3 in range(ord("a"), ord("z") + 1): c3 = chr(num3) dic[c1].append(c1 + c2 + c3 + "a") print("?" + dic["a"].pop()) used = set() while True: s = inp...
Traceback (most recent call last): File "/tmp/tmprn6nthus/tmpecizkvuo.py", line 14, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
?azza
s188281449
p01401
u647766105
1390055352
Python
Python
py
Runtime Error
0
0
560
s2i = lambda x: 0 if x == "S" else -1 if x == "G" else int(x) while True: w, h = map(int, raw_input().split()) if w | h == 0: break V = sorted(reduce(lambda a, b: a + b,[[(s2i(c), x, y) for x, c in enumerate(raw_input().split()) if c != "."] for y in xrange(h)])) dp = [[] for _ in xrange(V[-1][0...
File "/tmp/tmpo_7jeo2j/tmptjyu0m_j.py", line 11 print min(c + abs(V[0][1] - xx) + abs(V[0][2] - yy) for c, xx, yy in dp[-1]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s329842473
p01403
u023846178
1387109290
Python
Python
py
Runtime Error
39860
44060
332
p = [1] * 1000001 for i in range(3, 1001, 2): if p[i] == 0: continue for j in range(2, 1000001/i): p[i*j] = 0 t = int(raw_input()) for i in range(t): n = int(raw_input()) res = n * (n-1) / 2 + 2 for j in range(2, n+1): if p[j] == 1: res -= (n / j - 1) * (j - 1) ...
File "/tmp/tmpt_dosea3/tmpp4ddqfdh.py", line 15 print res ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s211825691
p01403
u023846178
1387109604
Python
Python
py
Runtime Error
39860
44064
329
p = [1] * 1000001 for i in range(2, 1001): if p[i] == 0: continue for j in range(2, 1000001/i): p[i*j] = 0 t = int(raw_input()) for i in range(t): n = int(raw_input()) res = n * (n-1) / 2 + 2 for j in range(2, n+1): if p[j] == 1: res -= (n / j - 1) * (j - 1) ...
File "/tmp/tmp3wduee45/tmpurg1c2pw.py", line 15 print res ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s333010025
p01403
u023846178
1387110055
Python
Python
py
Runtime Error
39850
44064
331
p = [1] * 1000001 for i in range(2, 1001): if p[i] == 0: continue for j in range(2, 1000000/i+1): p[i*j] = 0 t = int(raw_input()) for i in range(t): n = int(raw_input()) res = n * (n-1) / 2 + 2 for j in range(2, n+1): if p[j] == 1: res -= (n / j - 1) * (j - 1) ...
File "/tmp/tmplhm7p213/tmpjl8cm80s.py", line 15 print res ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s347143810
p01417
u506554532
1514191808
Python
Python3
py
Runtime Error
20
5676
612
import itertools N,M = map(int,input().split()) src = [tuple(map(float,input().split())) for i in range(N)] if M <= 1: print(0) exit() dists = [[None for j in range(N)] for i in range(N)] for i in range(N-1): for j in range(i+1,N): l1,a1,b1 = src[i] l2,a2,b2 = src[j] dist = 0 ...
Traceback (most recent call last): File "/tmp/tmpdnr5016n/tmpvf7266pz.py", line 2, in <module> N,M = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s608857707
p01417
u104911888
1373024965
Python
Python
py
Runtime Error
20000
4432
421
import itertools N,M=map(int,raw_input().split()) data=[map(float,raw_input().split()) for i in range(N)] maxInt=0 for comb in itertools.permutations(range(N),M): dist=0 for i in range(M-1): for j in range(i+1,M): t=comb[i] s=comb[j] dist+=pow(data[t][0]-data[s][0],2)...
File "/tmp/tmp3hwd458y/tmpfsulamvq.py", line 14 print maxInt ^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s466240505
p01417
u104911888
1373025233
Python
Python
py
Runtime Error
20000
4432
417
import itertools N,M=map(int,raw_input().split()) data=[map(float,raw_input().split()) for i in range(N)] maxV=0.0 for comb in itertools.permutations(range(N),M): dist=0.0 for i in range(M-1): for j in range(i+1,M): t=comb[i] s=comb[j] dist+=pow(data[t][0]-data[s][0],...
File "/tmp/tmp4dy1rr80/tmp6diiasjs.py", line 14 print maxV ^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s027570437
p01418
u509278866
1530785771
Python
Python3
py
Runtime Error
60
9024
1142
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 = 10**9+7 dd = [(-1,0),(0,1),(1,0),(0,-1)] ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)] def LI(): return [int(x) for x in sys.stdin....
Traceback (most recent call last): File "/tmp/tmphrky6_i_/tmphn7cyq1i.py", line 45, in <module> print(main()) ^^^^^^ File "/tmp/tmphrky6_i_/tmphn7cyq1i.py", line 21, in main k,r,l = LI() ^^^^^ ValueError: not enough values to unpack (expected 3, got 0)
s425799855
p01420
u509278866
1535438003
Python
Python3
py
Runtime Error
360
9424
1877
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**13 mod = 10**9+7 dd = [(-1,0),(0,1),(1,0),(0,-1)] ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)] def LI(): return [int(x) for x in sys.stdin....
Traceback (most recent call last): File "/tmp/tmpg16818w6/tmpyllw0pkw.py", line 79, in <module> print(main()) ^^^^^^ File "/tmp/tmpg16818w6/tmpyllw0pkw.py", line 40, in main n,m,l = LI() ^^^^^ ValueError: not enough values to unpack (expected 3, got 0)
s719243895
p01420
u811434779
1454996347
Python
Python
py
Runtime Error
0
0
1001
def upper_bound(arr, v) l = -1 r = arr.size while l + 1 < r m = (l + r) / 2 if arr[m] <= v then l = m else r = m end end r end EPS = 1e-9 Factorial = (1..50).each_with_object([1]) { |i, arr| arr << arr[-1] * i } n, m, l = gets.split.map(&:to_i) p, t, v = n.times.map{ gets.split.map(&:to_i) }...
File "/tmp/tmpqlyebg7n/tmp4xicdrq6.py", line 1 def upper_bound(arr, v) ^ SyntaxError: expected ':'
s405589902
p01420
u467175809
1529699205
Python
Python
py
Runtime Error
10
5008
1344
#!/usr/bin/env python from collections import deque import itertools as it import sys sys.setrecursionlimit(1000000) N, M, L = map(int, raw_input().split()) def fact(n): if n <= 1: return 1 return fact(n - 1) * n MC = [] for i in range(M + 1): MC.append(fact(M) / fact(i) / fact(M - i)) p_lst = ...
File "/tmp/tmpzbcd_of4/tmpl1y5s1cj.py", line 59 print ans ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s313049371
p01425
u695154284
1499780331
Python
Python
py
Runtime Error
0
0
1919
import math g = 9.8 ESP = 1e-6 def calc(vy, t): return vy * t - g * t * t / 2 def cmp(lb, ub, a): if a < lb + ESP: return -1 elif ub - ESP < a: return 1 else: return 0 def check(qx, qy): a = (g * g) / 4 b = g * qy - V * V c = qx * qx + qy * qy D = b * b - 4...
Traceback (most recent call last): File "/tmp/tmpgo68crre/tmpbo0qjmc8.py", line 68, in <module> N, V, X, Y = list(map(int, input().split())) ^^^^^^^ EOFError: EOF when reading a line
s351712796
p01437
u467175809
1529161242
Python
Python
py
Runtime Error
0
0
1600
#!/usr/bin/env python from collections import deque while True: c_ = [] H, W, L = map(int, raw_input().split()) if H == 0: break m = {} start = 0 for i in range(H): S = raw_input() c_.append(S) for d in ['N', 'E', 'S', 'W']: index = S.find(d) ...
File "/tmp/tmpr30txg96/tmpr0ezgsri.py", line 29 print str(y + 1) + " " + str(x + 1) + " " + d ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s538411185
p01438
u633068244
1424448381
Python
Python
py
Runtime Error
19930
198788
674
while 1: n = int(raw_input()) if n == 0: break L = [0]*n D = [0]*n for man in xrange(n): m,l = map(int,raw_input().split()) L[man] = l t = 0 for date in xrange(m): s,e = map(int,raw_input().split()) t ^= ((1 << (e-6))-1) ^ ((1 << (s-6))-1) ...
File "/tmp/tmpzmezhznz/tmpcjl_3kjx.py", line 21 print max(max(dp[i]) for i in xrange(n)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s634454355
p01438
u509278866
1528872613
Python
Python3
py
Runtime Error
0
0
1581
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 dd = [(0,-1),(1,0),(0,1),(-1,0)] ddn = [(0,-1),(1,-1),(1,0),(1,1),(0,1),(-1,-1),(-1,0),(-1,1)] def LI(): return [int(x) for x in sys.stdi...
Traceback (most recent call last): File "/tmp/tmpdhrwhl3_/tmpvfztc9an.py", line 57, in <module> print(main()) ^^^^^^ File "/tmp/tmpdhrwhl3_/tmpvfztc9an.py", line 24, in main n = I() ^^^ File "/tmp/tmpdhrwhl3_/tmpvfztc9an.py", line 14, in I def I(): return int(sys.stdin.readline()) ...
s376813219
p01440
u338373191
1476655142
Python
Python
py
Runtime Error
0
0
6213
# ???????????????????°?? ???????????´?????°?????????????????? #?????????????? ?±???????????????????? ???????????????? ???????????´?????°??????????????????, ???±???°???????°???????? ?????????????°???????? ???????????´?????°?????????????? ?????????¶???????????????? ??????????: # S = 123456789101112131415... #?????????´??...
Traceback (most recent call last): File "/tmp/tmppgtikv37/tmp79cw972a.py", line 111, in <module> s = str(input()) #???????°???? ?????????????????? ^^^^^^^ EOFError: EOF when reading a line
s753812683
p01440
u338373191
1476655507
Python
Python
py
Runtime Error
0
0
5824
# ???????????????????°?? ???????????´?????°?????????????????? #?????????????? ?±???????????????????? ???????????????? ???????????´?????°??????????????????, ???±???°???????°???????? ?????????????°???????? ???????????´?????°?????????????? ?????????¶???????????????? ??????????: # S = 123456789101112131415... #?????????´??...
Traceback (most recent call last): File "/tmp/tmp4opfgaaf/tmpdzapxlux.py", line 111, in <module> s = str(input()) #???????°???? ?????????????????? ^^^^^^^ EOFError: EOF when reading a line
s354283492
p01447
u835866094
1412110242
Python
Python
py
Runtime Error
0
0
1221
#coding:utf-8 import sys import copy def main(): line = sys.stdin.readline() #case while line.split() != ["0","0"]: analy(line) line = sys.stdin.readline() return def analy(line): #t field = [int(n) for n in line.split()] # *& num = int(sys.stdin.readline()) data...
File "/tmp/tmpbznacwn2/tmpb5qpeigg.py", line 33 # SyntaxError: source code cannot contain null bytes
s396810472
p01447
u835866094
1412110320
Python
Python
py
Runtime Error
0
0
1128
#coding:utf-8 import sys import copy def main(): line = sys.stdin.readline() while line.split() != ["0","0"]: analy(line) line = sys.stdin.readline() return def analy(line): field = [int(n) for n in line.split()] num = int(sys.stdin.readline()) data = [] for i in range(num...
Traceback (most recent call last): File "/tmp/tmpg1glymdu/tmpb6fm_723.py", line 44, in <module> main() File "/tmp/tmpg1glymdu/tmpb6fm_723.py", line 9, in main analy(line) File "/tmp/tmpg1glymdu/tmpb6fm_723.py", line 15, in analy num = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ Value...
s068503281
p01447
u835866094
1412110498
Python
Python
py
Runtime Error
0
0
1098
#coding:utf-8 import sys import copy def main(): line = sys.stdin.readline() while line.split() != ["0","0"]: analy(line) line = sys.stdin.readline() return def analy(line): field = [int(n) for n in line.split()] num = int(sys.stdin.readline()) data = [] for i in range(num...
Traceback (most recent call last): File "/tmp/tmpj46hjij9/tmprbs9gipc.py", line 43, in <module> main() File "/tmp/tmpj46hjij9/tmprbs9gipc.py", line 9, in main analy(line) File "/tmp/tmpj46hjij9/tmprbs9gipc.py", line 15, in analy num = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ Value...
s017276939
p01447
u835866094
1412110582
Python
Python3
py
Runtime Error
0
0
1136
#coding:utf-8 import sys import copy def main(): line = sys.stdin.readline() while line.split() != ["0","0"]: analy(line) line = sys.stdin.readline() return def analy(line): field = [int(n) for n in line.split()] num = int(sys.stdin.readline()) data = [] for i in range(num...
Traceback (most recent call last): File "/tmp/tmpcm9cd0an/tmpe6b51fgd.py", line 44, in <module> main() File "/tmp/tmpcm9cd0an/tmpe6b51fgd.py", line 9, in main analy(line) File "/tmp/tmpcm9cd0an/tmpe6b51fgd.py", line 15, in analy num = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ Value...
s430272661
p01447
u835866094
1412110608
Python
Python3
py
Runtime Error
0
0
1098
#coding:utf-8 import sys import copy def main(): line = sys.stdin.readline() while line.split() != ["0","0"]: analy(line) line = sys.stdin.readline() return def analy(line): field = [int(n) for n in line.split()] num = int(sys.stdin.readline()) data = [] for i in range(num...
Traceback (most recent call last): File "/tmp/tmplgypgelo/tmpmps4djq0.py", line 43, in <module> main() File "/tmp/tmplgypgelo/tmpmps4djq0.py", line 9, in main analy(line) File "/tmp/tmplgypgelo/tmpmps4djq0.py", line 15, in analy num = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ Value...
s025412685
p01447
u835866094
1412116239
Python
Python
py
Runtime Error
0
0
1260
#coding:utf-8 import sys import copy def main(): line = sys.stdin.readline() #case while line.split() != ["0","0"]: analy(line) line = sys.stdin.readline() return def analy(line): #???? field = [int(n) for n in line.split()] # ???A?c num = int(sys.stdin.readline(...
Traceback (most recent call last): File "/tmp/tmpbxpdz3xf/tmpb1k8c5ey.py", line 50, in <module> main() File "/tmp/tmpbxpdz3xf/tmpb1k8c5ey.py", line 10, in main analy(line) File "/tmp/tmpbxpdz3xf/tmpb1k8c5ey.py", line 18, in analy num = int(sys.stdin.readline()) ^^^^^^^^^^^^^^^^^^^^^^^^^ Valu...
s636595400
p01448
u266872031
1437617380
Python
Python
py
Runtime Error
39830
26384
417
import bisect N=int(raw_input()) tlist=[] for i in range(N): [a,b]=[int(x) for x in raw_input().split()] tlist.append([a,b]) tlist.sort(key=lambda x:x[1]) blist=[x[1] for x in tlist] #case N for k in range(N,0,-1): alist=sorted([x[0] for x in tlist[bisect.bisect_left(blist,k+1):]]) alist=alist[:bisect....
File "/tmp/tmphr0cz4b3/tmpchr_036t.py", line 15 print k ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s875159538
p01448
u266872031
1437618138
Python
Python
py
Runtime Error
39840
25740
756
import bisect N=int(raw_input()) tlist=[] for i in range(N): [a,b]=[int(x) for x in raw_input().split()] tlist.append([a,b]) tlist.sort(key=lambda x:x[1]) blist=[x[1] for x in tlist] #case N bb=bisect.bisect_left(blist,N+1) alist=sorted([x[0] for x in tlist[bb:]]) tlist=tlist[:bb] blist=blist[:bb] alist=alist[...
File "/tmp/tmphu0ffdo5/tmpgw76izzt.py", line 17 print N ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s986298598
p01448
u572790226
1466138045
Python
Python3
py
Runtime Error
40000
21176
286
N = int(input()) P = [] for i in range(N): a, b = map(int, input().split()) P.append((a, b)) Fmaxim = 0 for i in range(N+1): Pcount = 1 for a, b in P: if a <= i+1 <= b: Pcount += 1 if Pcount >= i+1: Fmaxim = max(Fmaxim, i) print(Fmaxim)
Traceback (most recent call last): File "/tmp/tmparvx8iua/tmp9v5h_nxb.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s361152854
p01448
u572790226
1466138668
Python
Python3
py
Runtime Error
40000
20936
358
N = int(input()) P = [] for i in range(N): a, b = map(int, input().split()) if a <= N+1: P.append((a, b)) if len(P) > 0: for i in range(len(P), -1, -1): Pcount = 1 for a, b in P: if a <= i+1 <= b: Pcount += 1 if Pcount >= i+1: print(i) ...
Traceback (most recent call last): File "/tmp/tmpjgimyfte/tmp6co1yk7w.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s013074755
p01448
u572790226
1466139921
Python
Python3
py
Runtime Error
40000
20996
402
N = int(input()) P = [] bmax = 0 for i in range(N): a, b = map(int, input().split()) bmax = max(bmax, b) if a <= N+1: P.append((a, b)) if len(P) > 0: for i in range(min(len(P), bmax), -1, -1): Pcount = 1 for a, b in P: if a <= i+1 <= b: Pcount += 1 ...
Traceback (most recent call last): File "/tmp/tmpp9oegbju/tmp_dxecp23.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s393130121
p01448
u371539389
1495904871
Python
Python3
py
Runtime Error
40000
9792
287
N=int(input()) friendlist=[0 for i in range(N+2)] for i in range(N): a,b=[int(j) for j in input().split(" ")] for k in range(a,min(N+2,b+1)): friendlist[k]+=1 k=N+1 i=0 while k>=0: if friendlist[k]>=k-1: i=k-1 break k-=1 print(i)
Traceback (most recent call last): File "/tmp/tmpvuapaf5a/tmpvobxubu0.py", line 1, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s570011144
p01448
u371539389
1496026080
Python
Python3
py
Runtime Error
40000
9700
363
N=int(input()) friendlist=[0 for i in range(N+2)] for i in range(N): a,b=[int(j) for j in input().split(" ")] for k in range(a,min(b+1,N+2)): friendlist[k]+=1 #ab=[[int(i) for i in input().split(" ")] for j in range(N)] #print(ab) k=N+1 i=0 while k>=0: if friendlist[k]>=k-1: i=k-1 ...
Traceback (most recent call last): File "/tmp/tmpelcn5pki/tmp5g12uc4h.py", line 1, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s776244099
p01448
u826975654
1496913044
Python
Python
py
Runtime Error
0
0
466
def appoint(x, l, h): if l <= x <= h: return 1 else: return 0 N = int(input()) friends = [list(map(int, input().split())) for i in range(N)] min_group = min(x[0] for x in friends) max_group = max(x[0] for x in friends) t = 0 ans = 1 for i in range(min_group, max_group): z = sum([appoint(i...
Traceback (most recent call last): File "/tmp/tmps7p_kf77/tmpd0vash8v.py", line 8, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s629505188
p01448
u826975654
1496914233
Python
Python
py
Runtime Error
0
0
579
def appoint(x, l, h): if l <= x <= h: return 1 else: return 0 N = int(raw_input()) friends = [list(map(int, raw_input().split())) for i in range(N)] min_group = min(x[0] for x in friends) max_group = max(x[0] for x in friends) t = 0 ans =...
File "/tmp/tmp2v02ux1p/tmpox9iae0b.py", line 8 N = int(raw_input()) ^ IndentationError: unindent does not match any outer indentation level
s785931196
p01448
u192570203
1504266203
Python
Python3
py
Runtime Error
30
8492
301
N = int(input()) l = [list(map(int, input().split())) for _ in range(N)] diff = [0] * 100001 for k in l : diff[k[0] - 1] += 1 diff[k[1]] -= 1 hist = [0,0] for i in range(2, N + 1) : hist.append(hist[-1] + diff[i-1]) print(max([y - 1 for (x,y) in zip(hist, range(N + 1)) if x + 1 >= y]))
Traceback (most recent call last): File "/tmp/tmp4t299qfc/tmpe1tkv2ue.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s717952327
p01448
u192570203
1504266326
Python
Python3
py
Runtime Error
40
8332
307
N = int(input()) l = [list(map(int, input().split())) for _ in range(N)] diff = [0] * 100001 for k in l : diff[k[0] - 1] += 1 diff[k[1]] -= 1 hist = [0,0] for i in range(2, N + 1) : hist.append(hist[-1] + diff[i-1]) print(max([0] + [y - 1 for (x,y) in zip(hist, range(N + 1)) if x + 1 >= y]))
Traceback (most recent call last): File "/tmp/tmp38hcp86d/tmpyk7h5mm4.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s262987631
p01448
u591052358
1528982018
Python
Python3
py
Runtime Error
80
6272
248
N = int(input()) t = [0 for i in range(100001)] for i in range(N): a,b = [int(i) for i in input().split(' ')] t[a-1] +=1 t[b] -= 1 ans = 0 for i in range(1,100001): t[i] += t[i-1] if (t[i] > i): ans = i print(ans)
Traceback (most recent call last): File "/tmp/tmpj0zbz0wx/tmpx900uqcs.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s999928933
p01449
u633068244
1424751201
Python
Python
py
Runtime Error
19920
10648
631
inf = 1 << 28 N = int(raw_input()) p = [int(raw_input()) for i in xrange(N)] to = [i for i in xrange(N+6)] used = [False]*N for i in xrange(N): if used[i]: continue seq = [] while 1: used[i] = True if i in seq: for j in seq: to[j] = 0 ...
File "/tmp/tmpw0f_xqkn/tmp7zwckmfd.py", line 25 print dp[N-1] ^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s192631523
p01449
u633068244
1424754740
Python
Python
py
Runtime Error
19930
4268
732
inf = 10**9 N = int(raw_input()) p = [int(raw_input()) for i in xrange(N)] to = [i for i in xrange(N)] for i in xrange(N): if to[i] != i: continue seq = set([]) while 1: if to[i] != i: for j in seq: to[j] = to[i] elif i in seq: for j in seq...
File "/tmp/tmpnbwwjkor/tmpgx3an79k.py", line 28 print dp[N-1] ^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s061144980
p01449
u633068244
1424878075
Python
Python
py
Runtime Error
19930
4272
732
inf = 10**9 N = int(raw_input()) p = [int(raw_input()) for i in xrange(N)] to = [i for i in xrange(N)] for i in xrange(N): if to[i] != i: continue seq = set([]) while 1: if to[i] != i: for j in seq: to[j] = to[i] elif i in seq: for j in seq...
File "/tmp/tmpt5k5hp67/tmp8943sa0_.py", line 28 print dp[N-1] ^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s966996933
p01449
u260980560
1430137392
Python
Python
py
Runtime Error
19930
7564
688
import Queue n = input() p = [] for i in xrange(n): p.append(int(raw_input())) dist = [10**7] * n mark = [0]*n que = Queue.PriorityQueue() que.put((0, 0)) dist[0] = 0 idx = 0 while not que.empty(): co, v = que.get() if dist[v] < co: continue for k in xrange(1, 7): idx += 1 go = v...
File "/tmp/tmptra44v_v/tmp5wx3whve.py", line 28 print dist[v] + 1 ^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s219191321
p01449
u260980560
1430139947
Python
Python
py
Runtime Error
20
4876
981
import Queue INF = 10**9+7 n = input() p = [] for i in xrange(n): p.append(int(raw_input())) dist = [10**7] * n calc = [-1] * n used = [False] * n que = Queue.PriorityQueue() que.put((0, 0)) dist[0] = 0 def dfs(pos, calc, used, f): if p[pos]==0: return pos if calc[pos]!=-1: return calc[pos] ...
File "/tmp/tmp90lr72_y/tmpx4vfcccs.py", line 39 print dist[v]+1 ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s734310997
p01449
u260980560
1430140091
Python
Python
py
Runtime Error
170
29808
1017
import Queue, sys INF = 10**9+7 n = input() p = [] for i in xrange(n): p.append(int(raw_input())) dist = [10**7] * n calc = [-1] * n used = [False] * n que = Queue.PriorityQueue() que.put((0, 0)) dist[0] = 0 sys.setrecursionlimit(10**5+7) def dfs(pos, calc, used, f): if p[pos]==0: return pos if calc...
File "/tmp/tmptk3k5mw1/tmplyagont8.py", line 40 print dist[v]+1 ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s990452106
p01449
u999854911
1490368015
Python
Python3
py
Runtime Error
40
8648
1427
import sys import queue ISLOOP = 999999999 def next_position(sugoroku, visited, curr, edges): if edges[curr] != -1: return edges[curr] if curr in visited: return ISLOOP if sugoroku[curr] == 0: return curr # ?????????????????§?????????????????????????????´???????????????????§????...
Traceback (most recent call last): File "/tmp/tmpsrcxyi1y/tmp0p0bd73l.py", line 56, in <module> main() File "/tmp/tmpsrcxyi1y/tmp0p0bd73l.py", line 19, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s258529166
p01449
u999854911
1490368782
Python
Python3
py
Runtime Error
40
8704
1330
import sys import queue ISLOOP = 999999999 def next_position(n, sugoroku, visited, curr, edges): if edges[curr] != -1: return edges[curr] if curr in visited: return ISLOOP if sugoroku[curr] == 0: return curr visited.append( curr ) edges[curr] = next_position(n, sugoroku, vis...
Traceback (most recent call last): File "/tmp/tmpq475mw30/tmpxd2sghpw.py", line 55, in <module> main() File "/tmp/tmpq475mw30/tmpxd2sghpw.py", line 18, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s690201137
p01449
u999854911
1490368942
Python
Python3
py
Runtime Error
33050
56300
1487
import sys import queue ISLOOP = 999999999 sys.setrecursionlimit(100000) def next_position(n, sugoroku, visited, curr, edges): if edges[curr] != -1: return edges[curr] if curr in visited: return ISLOOP if sugoroku[curr] == 0: return curr # ?????????????????§????????????????????...
Traceback (most recent call last): File "/tmp/tmppxx_96cs/tmpy3992fcy.py", line 58, in <module> main() File "/tmp/tmppxx_96cs/tmpy3992fcy.py", line 21, in main n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s429653415
p01453
u352394527
1545503163
Python
Python3
py
Runtime Error
1420
43556
1793
from collections import deque w, h = map(int, input().split()) mp = [input() for _ in range(h)] springs = [] tile_cnt = 0 for y in range(h): for x in range(w): if mp[y][x] == "*": springs.append((x, y)) if mp[y][x] == "g": gx, gy = x, y if mp[y][x] == "s": sx, sy = x, y tile_cnt ...
Traceback (most recent call last): File "/tmp/tmpiyf2y5b7/tmpwuoikz3v.py", line 3, in <module> w, h = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s706330737
p01470
u352394527
1545514767
Python
Python3
py
Runtime Error
20
5680
231
import operator n = int(input()) ops = {1:operator.add, 2:operator.sub, 3:operator.mul, 4:operator.truediv} ans = 0 for _ in range(n): o, y = map(int, input().split()) ans = ops[o](ans, y) print(int(ans))
Traceback (most recent call last): File "/tmp/tmpfetx9hsz/tmpc1pujp8p.py", line 2, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s161552118
p01470
u078042885
1484494863
Python
Python3
py
Runtime Error
20
7676
149
x=0 for _ in range(int(input())): o,y=map(int,input().split()) if o==1:x+=y elif o==2:x-=y elif o==3:x*=y else:x/=y print(int(x))
Traceback (most recent call last): File "/tmp/tmpc8_mqru2/tmpgaxeo6i2.py", line 2, in <module> for _ in range(int(input())): ^^^^^^^ EOFError: EOF when reading a line
s904543155
p01470
u116766943
1360130776
Python
Python
py
Runtime Error
10
4264
266
n = input() x = 0.0 for i in range(0,n): line = raw_input().split() if line[0] == "1": x += int(line[1]) elif line[0] == "2": x -= int(line[1]) elif line[0] == "3": x *= float(line[1]) elif line[0] == "4": x /= float(line[1]) print int(x)
File "/tmp/tmpqe4gcceu/tmplsj8o4mh.py", line 13 print int(x) ^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s756649413
p01470
u116766943
1360130816
Python
Python
py
Runtime Error
10
4272
267
n = input() x = 0.0 for i in range(0,n): line = raw_input().split() if line[0] == "1": x += int(line[1]) elif line[0] == "2": x -= int(line[1]) elif line[0] == "3": x *= float(line[1]) elif line[0] == "4": x /= float(line[1]) print long(x)
File "/tmp/tmpxbepv12s/tmpd7meud4_.py", line 13 print long(x) ^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s158662720
p01473
u633068244
1398759034
Python
Python
py
Runtime Error
10
4264
531
def fact(n): return 1 if n == 0 else n*fact(n-1) S = raw_input() l,s = len(S),set(list(S)) lens = len(s) d = [S.count(i) for i in s] if l%2 == 0: for i in range(lens): if d[i]%2 == 1: print 0 break else: denomi = 1 for i in range(lens): denomi *= fact(d[i]/2) print fact(l/2)/denomi else: for i in ...
File "/tmp/tmp34od1mbw/tmpt3s5l8rs.py", line 11 print 0 ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s663643574
p01479
u633068244
1399701379
Python
Python
py
Runtime Error
0
0
247
a = raw_input().replace("egg","0").replace("chicken","1") for i in range(len(a)-1): if a[i] == a[i+1]: if len(a[:i+1]) >= len(a[i+1:]): ans = a[:i+1][-1] break else: ans = a[i+1:][-1] break print "egg" if ans == "0" else "chicken"
File "/tmp/tmpcm40k9a3/tmpoazb323t.py", line 10 print "egg" if ans == "0" else "chicken" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s125324447
p01486
u011621222
1527244459
Python
Python3
py
Runtime Error
0
0
427
#include <iostream> #include <regex> using namespace std; int main(void){ string s; cin >> s; bool isCat = false; while(true){ if(s == "mew"){ isCat = true; break; } string buf_s = s; s = regex_replace(s, regex("mmewe"), "me"); s = regex_replace(s, regex("emeww"), "ew"); i...
File "/tmp/tmpqfisvq6t/tmpjac0z2bs.py", line 5 using namespace std; ^^^^^^^^^ SyntaxError: invalid syntax
s871793992
p01486
u467175809
1529069965
Python
Python
py
Runtime Error
10
4720
480
#!/usr/bin/env python S = raw_input() def func(lst): if type(lst) == type(0): return True if len(lst) > 2: return False ret = True for l in lst: ret = (ret or func(l)) return ret S = S.replace('mew', '[1]') S = S.replace('me', 'm[1]e') S = S.replace('m', '[') S = S.replace...
File "/tmp/tmplypxk_6b/tmpq5yfwinn.py", line 24 print 'Rabbit' ^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s953587271
p01489
u182677953
1463766020
Python
Python
py
Runtime Error
40000
35316
733
k = int(raw_input()) l,r = 0,k while (r-l)>1: m = (l+r)/2 if (m * (m + 1)) < k: l = m else: r = m b = l #print b ad = k - (b * (b + 1)) d = ((ad - 1) % (b + 1)) + 1 #print ad,d x = 2 * b + 1 y = 1 if (ad - d) > 0: x += 1 if d <= (b + 1 + 1) / 2: dd = d * 2 - 1 else: dz = (b + 1 - d) dd = dz * 2 + 2 ...
File "/tmp/tmpuc91pkg6/tmpmvbrqr_f.py", line 62 print ans ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s017211882
p01490
u214600613
1451142607
Python
Python
py
Runtime Error
0
0
3
p 0
File "/tmp/tmpyffne_3a/tmp6gt08pak.py", line 1 p 0 ^ SyntaxError: invalid syntax
s349110408
p01499
u633068244
1425218346
Python
Python
py
Runtime Error
19930
8184
241
import bisect mod = 10**9+7 N,T = map(int,raw_input().split()) D = sorted(int(raw_input()) for i in xrange(N)) ans = 1 for i in xrange(N): ans = ans * (bisect.bisect_right(D[:i],D[i]) - bisect.bisect_left(D[:i],D[i]-T)+1) % mod print ans
File "/tmp/tmpqyf30rty/tmpb6s4dzwr.py", line 8 print ans ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s709660853
p01513
u506554532
1513159964
Python
Python3
py
Runtime Error
0
0
513
while True: N = int(input()) if N == 0:break flgs = [0 for i in range(N)] for i in range(N): src = map(int,input().split()) for k in src[1:]: flgs[i] |= (1 << k) target = 0 src = map(int,input().split()) for k in src[1:]: target |= (1 << k) ans = -1 ...
Traceback (most recent call last): File "/tmp/tmp6xgas6rs/tmp5pmd1d_j.py", line 2, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s769179320
p01514
u023471147
1527079887
Python
Python3
py
Runtime Error
0
0
695
while True: t, p, r = map(int, input().split()) if t == p == r = 0: break data = [[0 for i in range(p + 1)] for i in range(t + 1)] for i in range(r): li = input().split() tid, pid, time = map(int, li[:3]) if li[3] == "WRONG": data[tid][pid] -= 1 else:...
File "/tmp/tmpdxwv11a0/tmpj927ri75.py", line 3 if t == p == r = 0: ^ SyntaxError: invalid syntax
s988185448
p01515
u633068244
1425208411
Python
Python
py
Runtime Error
0
0
401
import itertools as it T,F = True,False while 1: s = raw_input() if s == "#": break for b,a in zip(["=","->","*","+","-"],[" == "," <= "," and "," or "," not "]): s = s.replace(b,a) for v in xrange(2**11): a,b,c,d,e,f,g,h,i,j,k = map(int,list(format(v,"b").zfill(11))) if no...
File "/tmp/tmpdb8chhh6/tmpf_jahpyv.py", line 13 print "NO" ^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s527699365
p01515
u214600613
1498470688
Python
Python
py
Runtime Error
0
0
270
m=24*60*60 while True: n=int(input()) if n==0:break dp=[0]*(m+1) for _ in range(n): a,d=input().split() a,b,c=map(int,a.split(':')); d,e,f=map(int,d.split(':')); dp[a*3600+b*60+c]+=1 dp[d*3600+e*60+f]-=1 for i in range(m): dp[i+1]+=dp[i] print(max(dp))
Traceback (most recent call last): File "/tmp/tmpjw39hr2a/tmpzfge5gds.py", line 3, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s626226104
p01515
u759949288
1363897850
Python
Python
py
Runtime Error
0
0
4293
class TerminalNode(object): def __init__(self, value): self.index = int(value) self.value = value def __call__(self, assign): return self.value def printTree(self, visited=set(), indent=0): print("\t" * indent, self) def _getNextThen(self, index): return self def _getNextElse(self, index): return self...
File "/tmp/tmp4n7sieq7/tmpep2xv2xi.py", line 141 print "error: " + self.expr[self.index:] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s087269363
p01515
u759949288
1363905989
Python
Python
py
Runtime Error
0
0
5352
#!/usr/bin/env python #-*- coding:utf-8 -*- import sys sys.setrecursionlimit(10000) class TerminalNode(object): def __init__(self, value): self.index = int(value) self.value = value def __call__(self, assign): return self.value def printTree(self, visited=set(), indent=0): print "\t" * indent, self def _g...
File "/tmp/tmpbpov4l5l/tmpzukos8aq.py", line 13 print "\t" * indent, self ^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s316335056
p01531
u352394527
1546246985
Python
Python3
py
Runtime Error
0
0
275
c = {"1":"", "2":"k", "3":"s", "4":"t", "5":"n", "6":"h","7":"m", "8":"y", "9":"r", "0":"w"} m = {"T":"a", "L":"i", "U":"u", "R":"e", "D":"o"} s = input() ans = "" for i in range(0, len(s), 2): if com == "0U":ans += "nn" else:ans += c[com[0]] + m[com[1]] print(ans)
Traceback (most recent call last): File "/tmp/tmpj8xwohf4/tmp2dxzg_7z.py", line 4, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s068740998
p01538
u615353970
1411443821
Python
Python
py
Runtime Error
0
0
798
#include<iostream> #include<string> #include<vector> #define loop(i,a,b) for(int i = a ; i < b ; i ++) #define rep(i,a) loop(i,0,a) using namespace std; typedef long long int ll; int main(void){ ll Q; cin>>Q; while(Q--){ string str; int cnt = 0; cin>>str; vector<int> n(str.size()); rep(i,str.size())n[i]...
File "/tmp/tmpax5zbuad/tmpfogxq6vt.py", line 8 using namespace std; ^^^^^^^^^ SyntaxError: invalid syntax
s885708977
p01538
u226964304
1413368432
Python
Python3
py
Runtime Error
30
6828
512
import sys import math Q = sys.stdin.readline() for _ in range(int(Q)): cnt = 0 N = int(sys.stdin.readline()) digLeng = int(math.log10(N)) + 1 while digLeng > 1: Nmax = 0 for dig in range(digLeng): lNum = N // int(math.pow(10,dig)) rNum = N % int(math.pow(10,dig))...
Traceback (most recent call last): File "/tmp/tmp0vnmgtxv/tmpo3s5a7uj.py", line 4, in <module> for _ in range(int(Q)): ^^^^^^ ValueError: invalid literal for int() with base 10: ''
s455780406
p01538
u844945939
1414061912
Python
Python3
py
Runtime Error
0
0
208
for i in range(int(input())): n = int(input()) j = 0 while n >= 10: n = max((n // (10**k)) * (n % (10**k)) for k in range(1, int(log10(n)) + 1)) j += 1 print(j)
Traceback (most recent call last): File "/tmp/tmpt9ucle46/tmpgewty5yp.py", line 1, in <module> for i in range(int(input())): ^^^^^^^ EOFError: EOF when reading a line
s984855703
p01538
u844945939
1414062742
Python
Python3
py
Runtime Error
0
0
221
for i in range(int(input())): n = int(input()) j = 0 while n >= 10: L = [(n // (10**k)) * (n % (10**k)) for k in range(1, int(log10(n)) + 1)] n = max(L) j += 1 print(j)
Traceback (most recent call last): File "/tmp/tmpyhhu2d4e/tmpmv177giz.py", line 1, in <module> for i in range(int(input())): ^^^^^^^ EOFError: EOF when reading a line
s782160147
p01538
u844945939
1414063133
Python
Python3
py
Runtime Error
0
0
289
for i in range(int(input())): n = int(input()) j = 0 while n >= 10: m_max = 0 for k in range(1, int(log10(n)) + 1): m = (n // (10**k)) * (n % (10**k)) if m >= m_max: m_max = m n = m_max j += 1 print(j)
Traceback (most recent call last): File "/tmp/tmplskk3uy_/tmpb9q346lo.py", line 1, in <module> for i in range(int(input())): ^^^^^^^ EOFError: EOF when reading a line
s567348913
p01538
u659034691
1503648803
Python
Python3
py
Runtime Error
20
7720
932
#times volume24 2424 Q=int(input()) for i in range(Q): N=str(input()) c=0 while len(N)>1 and c<15: M=0 for j in range(1,len(N)): # print(N[:j]) l=int(N[:j]) r=int(N[j:]) l*=r if M<l: M=l # print(M) ...
Traceback (most recent call last): File "/tmp/tmpjs7ioj1f/tmpnpfq323h.py", line 2, in <module> Q=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s119763696
p01538
u591052358
1528779355
Python
Python3
py
Runtime Error
0
0
309
Q = int(input()) def solve(x,ans): X = str(x) if len(X) == 1: print(ans) return ret= 0 for i in range(1,len(X)): n = int(X[i:]) * int(X[:i]) ret = max(ans,n) #print(ret) return solve(ret,ans + 1) for i in range(Q): solve(int(input()),0)
Traceback (most recent call last): File "/tmp/tmpk03btxzv/tmp6cfj7md2.py", line 1, in <module> Q = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s698132933
p01538
u591052358
1528779632
Python
Python3
py
Runtime Error
0
0
309
Q = int(input()) def solve(x,ans): X = str(x) if len(X) == 1: print(ans) return ret= 0 for i in range(1,len(X)): n = int(X[i:]) * int(X[:i]) ret = max(ans,n) #print(ret) return solve(ret,ans + 1) for i in range(Q): solve(int(input()),0)
Traceback (most recent call last): File "/tmp/tmpm5u2jyvx/tmpukde2_6s.py", line 1, in <module> Q = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s217985597
p01545
u408260374
1493938641
Python
Python
py
Runtime Error
0
0
1052
import math import sys if sys.version[0] == '2': range, input = xrange, raw_input class FenwickTree: def __init__(self, a_list, f, default): # 0-indexed self.N = len(a_list) self.bit = a_list[:] self.f = f self.default = default for _ in range(self.N, 1 << (math...
Traceback (most recent call last): File "/tmp/tmpit2oil66/tmp1fn3dbc2.py", line 33, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s498534095
p01551
u591052358
1530692279
Python
Python3
py
Runtime Error
0
0
2323
table= {} def solve(dict,key): global table if key in table: # print('key=',key) return table[key] ret = [] #print(key) for i in dict[key]: if i[0] == '[': ret.append(i[1:-1]) else: ret += (solve(dict, i)) if len(ret) > 200: for i in...
Traceback (most recent call last): File "/tmp/tmpqhh1yft5/tmpz3_50386.py", line 22, in <module> Na, Nt, Ng, Nc = [int(i) for i in input().split()] ^^^^^^^ EOFError: EOF when reading a line
s687964027
p01554
u859393176
1466501687
Python
Python3
py
Runtime Error
0
0
254
n = int)input()) xs = [] for i in range(n): xs.append(input()) m = int(input()) flag = 1 for i in range(m): s = input() if s in l: print("Opened" if flag == 1 else "Closed", "by", s) flag ^= 1 else: print("Unknown", s)
File "/tmp/tmp3khxw8z8/tmpjupzecuy.py", line 1 n = int)input()) ^ SyntaxError: unmatched ')'
s808999802
p01554
u859393176
1466501741
Python
Python3
py
Runtime Error
0
0
255
n = int)input()) xs = [] for i in range(n): xs.append(input()) m = int(input()) flag = 1 for i in range(m): s = input() if s in xs: print("Opened" if flag == 1 else "Closed", "by", s) flag ^= 1 else: print("Unknown", s)
File "/tmp/tmpjn08l951/tmp8qkao1cj.py", line 1 n = int)input()) ^ SyntaxError: unmatched ')'
s308125029
p01554
u616098312
1466502009
Python
Python3
py
Runtime Error
0
0
295
now=False N=int(input()) for k in range(N): lst=lst.append(input()) M=int(input()) for t in range(M): ID=input() if ID in lst: now=not(now) if now: print("Opened by",ID) else: print("Closed by",ID) else: print("Unknown",ID)
Traceback (most recent call last): File "/tmp/tmpwawec9zm/tmpg8tjc537.py", line 2, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s789194819
p01554
u616098312
1466502138
Python
Python3
py
Runtime Error
0
0
302
now=False lst=[] N=int(input()) for k in range(N): lst=lst.append(input()) M=int(input()) for t in range(M): ID=input() if ID in lst: now=not(now) if now: print("Opened by",ID) else: print("Closed by",ID) else: print("Unknown",ID)
Traceback (most recent call last): File "/tmp/tmpc7yj3eo8/tmpx88do0_n.py", line 3, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s916258031
p01554
u633333374
1502755528
Python
Python
py
Runtime Error
0
0
549
def OorC(): if (T in lst) == True: if lst2[lst.index(T)] % 2 == 0: lst2[lst.index(T)] += 1 print "Opened by " + T else: lst2[lst.index(T)] += 1 print "Closed by " + T else: print "Unknown " + T while 1: N = int(input()) if...
File "/tmp/tmpshng6itx/tmp7ayce_gz.py", line 5 print "Opened by " + T ^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s867488545
p01554
u633333374
1502755695
Python
Python
py
Runtime Error
0
0
511
def OorC(): if (T in lst) == True: if lst2[lst.index(T)] % 2 == 0: lst2[lst.index(T)] += 1 print "Opened by " + T else: lst2[lst.index(T)] += 1 print "Closed by " + T else: print "Unknown " + T while 1: N = int(input()) ls...
File "/tmp/tmp9fa6gc0k/tmp239c_rmh.py", line 5 print "Opened by " + T ^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s335102612
p01554
u633333374
1502756417
Python
Python
py
Runtime Error
0
0
435
while 1: N = int(input()) a = 0 lst = [] for i in range(N): lst.append(str(raw_input())) M = int(input()) for j in range(M): T = str(raw_input()) if (T in lst) == True: if a == 0: a = 1 print "Opened by " + T else: ...
File "/tmp/tmpfzsjjrnb/tmpx9vygbrx.py", line 13 print "Opened by " + T ^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s628963025
p01554
u633333374
1502756697
Python
Python
py
Runtime Error
0
0
435
while 1: N = int(input()) a = 0 lst = [] for i in range(N): lst.append(str(raw_input())) M = int(input()) for j in range(M): T = str(raw_input()) if (T in lst) == True: if a == 0: a = 1 print "Opened by " + T else: ...
File "/tmp/tmp1hk_3okp/tmp96_0fb4t.py", line 13 print "Opened by " + T ^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s996701477
p01554
u633333374
1502842188
Python
Python
py
Runtime Error
0
0
418
N = int(input()) a = 0 lst = [] for i in range(N): lst.append(str(raw_input())) M = int(input()) for j in range(M): T = str(raw_input()) if (T in lst) == True: if a == 0: a = 1 print "Opened by " + T else: ...
File "/tmp/tmp91rou9gc/tmpt1hhrvn5.py", line 2 N = int(input()) IndentationError: unexpected indent
s758692515
p01554
u187648898
1525691130
Python
Python
py
Runtime Error
0
0
317
N = int(input()) U = [input() for i in range(N)] M = int(input()) T = [input() for i in range(M)] opened = False for T_i in T: if T_i in U: if opened == True: print('Closed by ' + T_i) opened == False else: print('Opened by ' + T_i) opened == True
Traceback (most recent call last): File "/tmp/tmpfd2dt0jo/tmpjdu3_e0c.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s795172668
p01554
u187648898
1525691161
Python
Python
py
Runtime Error
0
0
317
N = int(input()) U = [input() for i in range(N)] M = int(input()) T = [input() for i in range(M)] opened = False for T_i in T: if T_i in U: if opened == True: print('Closed by ' + T_i) opened == False else: print('Opened by ' + T_i) opened == True
Traceback (most recent call last): File "/tmp/tmp0u5tuflu/tmp4_mjb6i_.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s785275228
p01554
u187648898
1525691170
Python
Python
py
Runtime Error
0
0
315
N = int(input()) U = [input() for i in range(N)] M = int(input()) T = [input() for i in range(M)] opened = False for T_i in T: if T_i in U: if opened == True: print('Closed by ' + T_i) opened = False else: print('Opened by ' + T_i) opened = True
Traceback (most recent call last): File "/tmp/tmp1x87hicb/tmpfkrrhhs9.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s618276833
p01554
u187648898
1525691253
Python
Python
py
Runtime Error
0
0
315
N = int(input()) U = [input() for i in range(N)] M = int(input()) T = [input() for i in range(M)] opened = False for T_i in T: if T_i in U: if opened == True: print('Closed by ' + T_i) opened = False else: print('Opened by ' + T_i) opened = True
Traceback (most recent call last): File "/tmp/tmp3m2nqbfk/tmp6qwczeic.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line