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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s724021207 | p01137 | u361804125 | 1381842243 | Python | Python | py | Runtime Error | 39870 | 4212 | 220 | while 1:
e = input()
if e == 0:
break;
else:
mini = 10000000
for z in range(100):
for y in range(1000):
x = e - y*y - z*z*z
if x >= 0:
if x + y + z < mini:
mini = x + y + z
print mini | File "/tmp/tmp07uynri2/tmpbb3q3ueq.py", line 13
print mini
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s282049929 | p01137 | u361804125 | 1381843154 | Python | Python | py | Runtime Error | 39870 | 4212 | 219 | while 1:
e = input()
if e == 0:
break;
else:
mini = 1000000
for z in range(100):
for y in range(1000):
x = e - y*y - z*z*z
if x >= 0:
if x + y + z < mini:
mini = x + y + z
print mini | File "/tmp/tmp6auujywq/tmp21a1u7td.py", line 13
print mini
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s665218091 | p01137 | u361804125 | 1381843844 | Python | Python | py | Runtime Error | 39860 | 4224 | 260 | while 1:
e = input()
if e == 0:
break;
else:
mini = 1000000
for z in range(100):
if z*z*z > e: break
for y in range(1000):
x = e - y*y - z*z*z
if x >= 0:
if x + y + z < mini:
mini = x + y + z
else:
break
print mini | File "/tmp/tmp5bh60_ky/tmpm9ny4_99.py", line 16
print mini
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s072501425 | p01137 | u361804125 | 1381844118 | Python | Python | py | Runtime Error | 39870 | 4220 | 260 | while 1:
e = input()
if e == 0:
break;
else:
mini = 1000000
for z in range(101):
if z*z*z > e: break
for y in range(1001):
x = e - y*y - z*z*z
if x >= 0:
if x + y + z < mini:
mini = x + y + z
else:
break
print mini | File "/tmp/tmpikap3h1c/tmp7uohi9e_.py", line 16
print mini
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s298444313 | p01137 | u361804125 | 1381844516 | Python | Python | py | Runtime Error | 39860 | 4220 | 260 | while 1:
e = input()
if e == 0:
break;
else:
mini = 1000000
for z in range(101):
if z*z*z > e: break
for y in range(1001):
x = e - y*y - z*z*z
if x >= 0:
if x + y + z < mini:
mini = x + y + z
else:
break
print mini | File "/tmp/tmphdxex4ij/tmpbg1j1d9u.py", line 16
print mini
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s404907283 | p01137 | u361804125 | 1381844726 | Python | Python | py | Runtime Error | 39870 | 4220 | 260 | while 1:
e = input()
if e == 0:
break;
else:
mini = 1000000
for z in range(101):
if z*z*z > e: break
for y in range(1001):
x = e - y*y - z*z*z
if x >= 0:
if x + y + z < mini:
mini = x + y + z
else:
break
print mini | File "/tmp/tmpdr1z3xu3/tmppwdprz_y.py", line 16
print mini
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s877010545 | p01137 | u553881259 | 1391324697 | Python | Python | py | Runtime Error | 39870 | 4196 | 240 | while 1:
e = input()
if e==0 : break
m = 1<<30
z = 0
while z*z*z <= e:
y = 0
while y*y + z*z*z <= e:
x = e - z*z*z - y*y
m = min(m, x+y+z)
y+=1
z+=1
print m | File "/tmp/tmp7plh33hp/tmph50g6xw6.py", line 13
print m
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s966999818 | p01137 | u633068244 | 1398235307 | Python | Python | py | Runtime Error | 39850 | 74004 | 227 | while 1:
e = input()
if e == 0: break
ans = 3*e
for z in range(e+1):
z3 = z**3
if z3 > e: break
for y in range(e+1):
y2 = y**2
x = e - y2 - z3
if x >= 0:
ans = min(ans,x+y+z)
else:
break
print ans | File "/tmp/tmpi7vp7e6t/tmp_lii936a.py", line 15
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s079925468 | p01137 | u633068244 | 1398235407 | Python | Python | py | Runtime Error | 39850 | 73940 | 216 | while 1:
e = input()
if e == 0: break
ans = 3*e
for z in range(e+1):
z3 = z**3
if z3 > e: break
for y in range(e+1):
x = e - y**2 - z3
if x >= 0:
ans = min(ans,x+y+z)
else:
break
print ans | File "/tmp/tmpcjmyglah/tmpmderjt7w.py", line 14
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s623018802 | p01137 | u633068244 | 1398237659 | Python | Python | py | Runtime Error | 0 | 0 | 164 | while 1:
e = ans = input()
if e == 0: break
for z in range(e):
z3 = z**3
if z3 > e: break
y = int((e-z3)**0.5)
ans = min(ans,e+y+z-y**2-z3)
print ans | File "/tmp/tmpxl2qhuwz/tmps4qt8ruc.py", line 6
if z3 > e: break
TabError: inconsistent use of tabs and spaces in indentation
| |
s402806384 | p01138 | u633068244 | 1422552576 | Python | Python | py | Runtime Error | 0 | 0 | 364 | def to_sec(a):
h,m,s = map(int,a.split(":"))
return 3600*h+60*m+s
while 1:
n = int(raw_input())
if n == 0: break
used = [0]*84401
for loop in range(n):
a,b = raw_input().split()
a,b = to_sec(a),to_sec(b)
used[a] += 1
used[b] -= 1
for i in range(1,84400):
... | File "/tmp/tmpf1d_ao20/tmpvxplllrt.py", line 16
print max(used)
^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s729530130 | p01138 | u214600613 | 1498470771 | 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/tmp_jsf9vw_/tmpant47rwq.py", line 3, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s327248861 | p01138 | u214600613 | 1498470913 | 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/tmpppjbgij1/tmp1q9zmsle.py", line 3, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s001815991 | p01138 | u214600613 | 1498471014 | Python | Python | py | Runtime Error | 0 | 0 | 272 | 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/tmpq0ku3_nx/tmpifkxxmdm.py", line 3, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s556001507 | p01138 | u214600613 | 1498471030 | Python | Python | py | Runtime Error | 0 | 0 | 274 | 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/tmp3vm299zu/tmp2cea70qs.py", line 3, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s973795760 | p01138 | u214600613 | 1498471049 | Python | Python | py | Runtime Error | 0 | 0 | 277 | 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/tmpas3clr0i/tmpvwactp_r.py", line 3, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s207518192 | p01138 | u214600613 | 1498471065 | Python | Python | py | Runtime Error | 0 | 0 | 278 | 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/tmp705r0s5k/tmp1kcopftm.py", line 3, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s890488780 | p01138 | u214600613 | 1498471082 | Python | Python | py | Runtime Error | 0 | 0 | 280 | 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/tmpjy2h4vzc/tmp4lnie22k.py", line 3, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s550272295 | p01138 | u779627195 | 1353409897 | Python | Python | py | Runtime Error | 19930 | 6796 | 488 | while 1:
n = int(raw_input())
if not n: break
cnt = 1
t = [0 for i in xrange(24*60*60)]
for i in xrange(n):
a = raw_input().split()
h,m,s = [0,0],[0,0],[0,0]
for i in xrange(2):
h[i],m[i],s[i] = map(int, a[i].split(':'))
t1 = h[0]*60**2 + m[0]*60 + s[0]
... | File "/tmp/tmphey_c6q6/tmpc3f6cu9w.py", line 19
print cnt
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s718969122 | p01139 | u633068244 | 1422554407 | Python | Python | py | Runtime Error | 0 | 0 | 601 | def rec(x,y,c):
if A[y][x] == ".": A[y][x] = c
elif A[y][x] != c : A[y][x] = "x"
for dx,dy in zip([1,0,-1,0],[0,1,0,-1]):
nx,ny = x+dx,y+dy
if 0 <= nx < w and 0 <= ny < h and A[ny][nx] in [".","b" if c == "w" else "w"]:
rec(nx,ny,c)
while 1:
w,h = map(int,raw_input().spli... | File "/tmp/tmp00uf0kbk/tmpwg0b2tdh.py", line 17
print sum(Ai.count("b") for Ai in A),sum(Ai.count("w") for Ai in A)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s178173644 | p01139 | u316268279 | 1426006884 | Python | Python3 | py | Runtime Error | 0 | 0 | 1026 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
def dfs(x, y, symbol,land):
if land[y][x] != '.':
return ([land[y][x]] if not str(land[y][x]).isnumeric() else False), 0
land[y][x] = symbol
count = 1
dxdy = [(1,0),(-1,0),(0,1),(0,-1)]
owner_list = []
for dx,dy in dxdy:
if 0 <= x +... | Traceback (most recent call last):
File "/tmp/tmp6h33_gd4/tmpovfxx_84.py", line 22, in <module>
w,h = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s113658624 | p01139 | u316268279 | 1426006975 | Python | Python3 | py | Runtime Error | 0 | 0 | 1026 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
def dfs(x, y, symbol,land):
if land[y][x] != '.':
return ([land[y][x]] if not str(land[y][x]).isnumeric() else False), 0
land[y][x] = symbol
count = 1
dxdy = [(1,0),(-1,0),(0,1),(0,-1)]
owner_list = []
for dx,dy in dxdy:
if 0 <= x +... | Traceback (most recent call last):
File "/tmp/tmp7aevpf2k/tmpocfwm65b.py", line 22, in <module>
w,h = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s932529514 | p01139 | u408260374 | 1435401370 | Python | Python3 | py | Runtime Error | 0 | 0 | 1207 | def dfs(r, c, n):
if board[r][c] == n:
return
if board[r][c] in 'WB':
pile.append(board[r][c])
return
board[r][c] = n
drc = [(-1, 0), (0, 1), (1, 0), (0, -1)]
for dr, dc in drc:
nr, nc = r + dr, c + dc
if 0 <= nr < h and 0 <= nc < w:
dfs(nr, nc, n... | Traceback (most recent call last):
File "/tmp/tmpxmiy81um/tmp0xsv4csy.py", line 15, in <module>
w, h = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s612272186 | p01139 | u774593007 | 1436430453 | Python | Python | py | Runtime Error | 0 | 0 | 1580 | class Area:
def __init__(self,m,x,y):
self.m = m
self.f_W = False
self.f_B = False
self.side = 0
self.count = 0
self.standardx = x
self.standardy = y
self.check(x,y)
self.getSide()
def check(self,x,y):
if(y<0 or y >= len(m) or x<0 o... | File "/tmp/tmp17zvk8u3/tmpd0ih551h.py", line 66
print B,W
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s617883593 | p01139 | u774593007 | 1436430538 | Python | Python | py | Runtime Error | 0 | 0 | 1580 | class Area:
def __init__(self,m,x,y):
self.m = m
self.f_W = False
self.f_B = False
self.side = 0
self.count = 0
self.standardx = x
self.standardy = y
self.check(x,y)
self.getSide()
def check(self,x,y):
if(y<0 or y >= len(m) or x<0 o... | File "/tmp/tmpjjs2xvh6/tmpil7mtywj.py", line 66
print B,W
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s773747206 | p01139 | u774593007 | 1436430743 | Python | Python | py | Runtime Error | 0 | 0 | 1581 | class Area:
def __init__(self,m,x,y):
self.m = m
self.f_W = False
self.f_B = False
self.side = 0
self.count = 0
self.standardx = x
self.standardy = y
self.check(x,y)
self.getSide()
def check(self,x,y):
if(y<0 or y >= len(m) or x<0 ... | File "/tmp/tmpe5e1qhm4/tmp5joru69u.py", line 67
print B,W
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s692870397 | p01139 | u774593007 | 1436430929 | Python | Python | py | Runtime Error | 0 | 0 | 1581 | class Area:
def __init__(self,m,x,y):
self.m = m
self.f_W = False
self.f_B = False
self.side = 0
self.count = 0
self.standardx = x
self.standardy = y
self.check(x,y)
self.getSide()
def check(self,x,y):
if(y<0 or y >= len(m) or x<0 ... | File "/tmp/tmpx4m2lj84/tmp7tp3o_nn.py", line 67
print B,W
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s531738913 | p01139 | u797673668 | 1510310211 | Python | Python3 | py | Runtime Error | 0 | 0 | 1029 | from collections import Counter
def paint(field, i, j, b, f, moves={(-1, 0), (1, 0), (0, 1), (0, -1)}):
fij = field[i][j]
if fij & f:
return
if fij & 4 and not fij & b:
return
field[i][j] |= b | f
for di, dj in moves:
ni = i + di
nj = j + dj
if nj < 0 or w <... | Traceback (most recent call last):
File "/tmp/tmpyi00q4fe/tmp870jus1c.py", line 22, in <module>
w, h = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s330821932 | p01139 | u797673668 | 1510310295 | Python | Python3 | py | Runtime Error | 0 | 0 | 1073 | import sys
from collections import Counter
sys.set_coroutine_wrapper(2500)
def paint(field, i, j, b, f, moves={(-1, 0), (1, 0), (0, 1), (0, -1)}):
fij = field[i][j]
if fij & f:
return
if fij & 4 and not fij & b:
return
field[i][j] |= b | f
for di, dj in moves:
ni = i + di
... | Traceback (most recent call last):
File "/tmp/tmpqnel8xs4/tmpkhvt9zqu.py", line 4, in <module>
sys.set_coroutine_wrapper(2500)
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'sys' has no attribute 'set_coroutine_wrapper'
| |
s564411829 | p01139 | u248416507 | 1510728205 | Python | Python | py | Runtime Error | 0 | 0 | 2010 |
W = 0
H = 0
island = list()
NOT_SUR = 0
BLACK = 1
WHITE = 2
def read_island():
island = list()
w, h = map(int, raw_input().split())
for i in xrange(h):
line = raw_input()
chars = list()
for ch in line:
chars.append(ch)
island.append(chars)
return w, h, isl... | File "/tmp/tmp_fmpuspl/tmpelgae334.py", line 90
print "{} {}".format(black_area, white_area)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s316675885 | p01139 | u248416507 | 1510728432 | Python | Python | py | Runtime Error | 0 | 0 | 2010 |
W = 0
H = 0
island = list()
NOT_SUR = 0
BLACK = 1
WHITE = 2
def read_island():
island = list()
w, h = map(int, raw_input().split())
for i in xrange(h):
line = raw_input()
chars = list()
for ch in line:
chars.append(ch)
island.append(chars)
return w, h, isl... | File "/tmp/tmp6hoi36l9/tmpcmnpsu46.py", line 90
print "{} {}".format(black_area, white_area)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s174245490 | p01139 | u672443148 | 1517365550 | Python | Python3 | py | Runtime Error | 0 | 0 | 1277 | def fill(MAP,xy,stick):
global w,h
if stick=='B': sflag=0
else: sflag=1
x,y=(xy[0],xy[1])
if MAP[y][x][sflag]==0: MAP[y][x][sflag]=1
xlist=[1,-1,0,0]
ylist=[0,0,1,-1]
for dx,dy in zip(xlist,ylist):
nx=x+dx
ny=y+dy
if 0<=nx<w and 0<=ny<h:
if MAP[ny][nx... | Traceback (most recent call last):
File "/tmp/tmplr0jst6y/tmpx5fshdhu.py", line 31, in <module>
w,h=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s560275938 | p01139 | u672443148 | 1517365583 | Python | Python3 | py | Runtime Error | 0 | 0 | 1277 | def fill(MAP,xy,stick):
global w,h
if stick=='B': sflag=0
else: sflag=1
x,y=(xy[0],xy[1])
if MAP[y][x][sflag]==0: MAP[y][x][sflag]=1
xlist=[1,-1,0,0]
ylist=[0,0,1,-1]
for dx,dy in zip(xlist,ylist):
nx=x+dx
ny=y+dy
if 0<=nx<w and 0<=ny<h:
if MAP[ny][nx... | Traceback (most recent call last):
File "/tmp/tmpjk6xwauc/tmpw8blgy9g.py", line 31, in <module>
w,h=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s354789033 | p01139 | u104911888 | 1372657944 | Python | Python | py | Runtime Error | 0 | 0 | 906 | dx=(1,-1,0,0)
dy=(0,0,1,-1)
def dfsW(y,x):
if L[y][x]==".":
L[y][x]="P"
for i in range(4):
mx=x+dx[i]
my=y+dy[i]
if 0<=mx<w and 0<=my<h and L[my][mx]==".":
dfsW(my,mx)
def dfsB(y,x):
if L[y][x]==".":
L[y][x]="Q"
elif L[y][x]=="P":
L[y][x]="N"... | File "/tmp/tmpsq5c89bt/tmp9laj2a5b.py", line 38
cntW+=L[i].count("P")
TabError: inconsistent use of tabs and spaces in indentation
| |
s162400790 | p01140 | u125742989 | 1559570919 | Python | Python3 | py | Runtime Error | 0 | 0 | 830 | from collections import Counter
while True:
N, M = map(int, input().split())
if N == 0 and M == 0:
break
H = [int(input()) for _ in range(N)]
W = [int(input()) for _ in range(M)]
for i in range(1, N):
H[i] += H[i-1]
for i in range(1, N):
W[i] += W[i-1]
all_H = [H[j]... | Traceback (most recent call last):
File "/tmp/tmp2mv23_rl/tmpxb2x14g8.py", line 4, in <module>
N, M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s584624029 | p01140 | u125742989 | 1559571044 | Python | Python3 | py | Runtime Error | 0 | 0 | 830 | from collections import Counter
while True:
N, M = map(int, input().split())
if N == 0 and M == 0:
break
H = [int(input()) for _ in range(N)]
W = [int(input()) for _ in range(M)]
for i in range(1, N):
H[i] += H[i-1]
for i in range(1, M):
W[i] += W[i-1]
all_H = [H[j]... | Traceback (most recent call last):
File "/tmp/tmpnio_m8sp/tmpz_gjl8ra.py", line 4, in <module>
N, M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s909207427 | p01140 | u125742989 | 1559571178 | Python | Python3 | py | Runtime Error | 0 | 0 | 834 | from collections import Counter
while True:
N, M = map(int, input().split())
if N == 0 and M == 0:
break
H = [int(input()) for _ in range(N)]
W = [int(input()) for _ in range(M)]
for i in range(1, N):
H[i] += H[i-1]
for i in range(1, M):
W[i] += W[i-1]
all_H = [H[j]... | Traceback (most recent call last):
File "/tmp/tmpaw_88j0k/tmpu9sl_exh.py", line 4, in <module>
N, M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s197074995 | p01140 | u633068244 | 1422358657 | Python | Python | py | Runtime Error | 0 | 0 | 514 | while 1:
N,M = map(int,raw_input().split())
if N == 0: break
h = [int(raw_input()) for _ in range(N)]
w = [int(raw_input()) for _ in range(M)]
ans = 0
H,W = h[:],w[:]
for i in range(N):
s = h[i]
for j in range(i+1,N):
s += h[j]
H.append(s)
for i in... | File "/tmp/tmpcn31bbus/tmp43607_em.py", line 21
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s791499474 | p01140 | u633068244 | 1422358690 | Python | Python | py | Runtime Error | 19930 | 4548 | 514 | while 1:
N,M = map(int,raw_input().split())
if N == 0: break
h = [int(raw_input()) for _ in range(N)]
w = [int(raw_input()) for _ in range(M)]
ans = 0
H,W = h[:],w[:]
for i in range(N):
s = h[i]
for j in range(i+1,N):
s += h[j]
H.append(s)
for i in... | File "/tmp/tmpt9v88_p4/tmplf_pf4_4.py", line 21
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s427311913 | p01140 | u266872031 | 1422720691 | Python | Python | py | Runtime Error | 19930 | 4348 | 665 | while(1):
[N,M]=[int(x) for x in raw_input().split()]
if N==0:
break
else:
H=[]
W=[]
for i in range(N):
H.append(int(raw_input()))
for i in range(M):
W.append(int(raw_input()))
S=0
for top in range(N):
for left in ra... | File "/tmp/tmp7epdf5me/tmpkwxhfxj1.py", line 25
print S
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s850250799 | p01140 | u731235119 | 1422946493 | Python | Python | py | Runtime Error | 19930 | 57428 | 1440 | from math import log
class SegmentTree :
def __init__ (self, N):
self.N = N
self.tree = [0 for i in range(2 * N - 1)]
def update(self,i,x):
node = i + self.N - 1
self.tree[node] += x
while node > 0:
node = (node-1) / 2
self.tree[node] += x
def sum(self,here,l,r,hl,hr): #init : hl = 0, hr = N = 2 **... | File "/tmp/tmp3gbgegdx/tmpbyfml_ev.py", line 47
print sum([Lon[i]*Lat[i] for i in range(1,max_width+1)])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s421772319 | p01140 | u316268279 | 1430131169 | Python | Python3 | py | Runtime Error | 19930 | 42480 | 771 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
while True:
N,M = map(int,input().split())
if N == 0 and M == 0:
break
square_count_w = [0 for i in range(1000*1500+1)]
square_count_h = [0 for i in range(1000*1500+1)]
heights = []
widths = []
for i in range(N):
height = int(in... | Traceback (most recent call last):
File "/tmp/tmp6ri6_6as/tmpqs7icvs_.py", line 5, in <module>
N,M = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s073891114 | p01140 | u408260374 | 1430134448 | Python | Python | py | Runtime Error | 19920 | 100932 | 593 | while True:
N, M = map(int, raw_input().split())
if N == 0 and M == 0: break
h = [input() for _ in range(N)]
for i in range(N-1):
h[i+1] += h[i]
w = [input() for _ in range(M)]
for i in range(M-1):
w[i+1] += w[i]
h = [0] + h
w = [0] + w
hl = [0] * (1000 * 1000)
wl... | File "/tmp/tmpkeev1fdh/tmp2ye7msee.py", line 24
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s953695896 | p01140 | u408260374 | 1430134537 | Python | Python | py | Runtime Error | 19930 | 100916 | 601 | while True:
N, M = map(int, raw_input().split())
if N == 0 and M == 0: break
h = [input() for _ in range(N)]
for i in range(N-1):
h[i+1] += h[i]
w = [input() for _ in range(M)]
for i in range(M-1):
w[i+1] += w[i]
h = [0] + h
w = [0] + w
hl = [0] * (1000 * 1000 + 1)
... | File "/tmp/tmp2y04q1kl/tmpcruder87.py", line 24
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s538430113 | p01140 | u572790226 | 1466063246 | Python | Python3 | py | Runtime Error | 40000 | 7888 | 593 | while True:
N, M = map(int, input().split())
if N == M == 0:
break
L = []
C = []
for i in range(N):
L.append(int(input()))
for i in range(M):
C.append(int(input()))
for i in range(2, N+1):
sL = []
for j in range(N + 1 - i):
sL.append(sum(L... | Traceback (most recent call last):
File "/tmp/tmpn1w6z5_d/tmp6jtaa8c5.py", line 2, in <module>
N, M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s878195211 | p01140 | u572790226 | 1466068652 | Python | Python3 | py | Runtime Error | 40000 | 41080 | 799 | while True:
N, M = map(int, input().split())
if N == M == 0:
break
L = []
C = []
dL = {}
count = 0
for i in range(N):
l = int(input())
L.append(l)
if not l in dL:
dL[l] = 1
else:
dL[l] += 1
sL = []
for i in range(... | Traceback (most recent call last):
File "/tmp/tmpg2v19vzc/tmp8f415i09.py", line 2, in <module>
N, M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s314211946 | p01140 | u892219101 | 1474038878 | Python | Python3 | py | Runtime Error | 0 | 0 | 406 | import collections
cnt1=collections.Counter()
cnt2=collections.Counter()
n,m=map(int, input().split())
ll=[0]*1500
for i in range(n):
x=int(input())
for j in range(i):
ll[j]+=x
cnt1[ll[j]]+=1
for i in range(m):
x=int(input())
for j in range(i):
ll[j]+=x
cnt2[ll[j]]+=1
se... | Traceback (most recent call last):
File "/tmp/tmpznm25qvi/tmp469j4ozy.py", line 4, in <module>
n,m=map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s796117875 | p01140 | u358919705 | 1475493410 | Python | Python3 | py | Runtime Error | 40000 | 9120 | 510 | import itertools
while True:
N, M = map(int, input().split())
if not N:
break
hs = [0] + [int(input()) for i in range(N)]
ws = [0] + [int(input()) for i in range(M)]
for i in range(N):
hs[i + 1] += hs[i]
for i in range(M):
ws[i + 1] += ws[i]
xs = sorted(map(lambda x: ... | Traceback (most recent call last):
File "/tmp/tmpte5i_ylm/tmpobzyh6qx.py", line 3, in <module>
N, M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s764993598 | p01140 | u797673668 | 1510299325 | Python | Python3 | py | Runtime Error | 0 | 0 | 601 | from collections import defaultdict
from itertools import accumulate
buf = []
while True:
n, m = int(input())
if n == 0:
break
hs = [int(input()) for _ in range(n)]
ws = [int(input()) for _ in range(m)]
ha = accumulate(hs)
wa = accumulate(ws)
hd = defaultdict(int)
wd = defaultdi... | Traceback (most recent call last):
File "/tmp/tmpolnhid_g/tmpg2sctxq8.py", line 6, in <module>
n, m = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s705007521 | p01140 | u234579471 | 1521992008 | Python | Python3 | py | Runtime Error | 0 | 0 | 747 | while True:
n, m = map(int, input().split())
if n == 0 and m == 0:
break
h = [0]
for i in range(n):
h.append(int(input()) + h[i])
w = [0]
for i in range(m):
w.append(int(input()) + w[i])
hList = [0] * 1000
for i in range(n + 1):
for j in range(i, n + 1):
... | Traceback (most recent call last):
File "/tmp/tmpucill0l2/tmp5ir746ro.py", line 2, in <module>
n, m = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s217399743 | p01140 | u234579471 | 1521992098 | Python | Python3 | py | Runtime Error | 0 | 0 | 747 | while True:
n, m = map(int, input().split())
if n == 0 and m == 0:
break
h = [0]
for i in range(n):
h.append(int(input()) + h[i])
w = [0]
for i in range(m):
w.append(int(input()) + w[i])
hList = [0] * 1000
for i in range(n + 1):
for j in range(i, n + 1):
... | Traceback (most recent call last):
File "/tmp/tmpjcqma839/tmp9f64npnq.py", line 2, in <module>
n, m = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s738013127 | p01140 | u234579471 | 1521992098 | Python | Python3 | py | Runtime Error | 0 | 0 | 747 | while True:
n, m = map(int, input().split())
if n == 0 and m == 0:
break
h = [0]
for i in range(n):
h.append(int(input()) + h[i])
w = [0]
for i in range(m):
w.append(int(input()) + w[i])
hList = [0] * 1000
for i in range(n + 1):
for j in range(i, n + 1):
... | Traceback (most recent call last):
File "/tmp/tmpudzyp4ns/tmpljbiyc5q.py", line 2, in <module>
n, m = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s503292402 | p01140 | u734301890 | 1522052262 | Python | Python3 | py | Runtime Error | 0 | 0 | 742 | import math
def ans(N, M, h, w):
count = 0
for hr1 in range(N+1):
for hr2 in range(N+1):
if hr2 <= hr1: continue
height = sum(h[e] for e in range(hr1, hr2))
for wr1 in range(M+1):
for wr2 in range(M+1):
if wr2 <= wr1:... | Traceback (most recent call last):
File "/tmp/tmppio12jhs/tmpz7u_yaz_.py", line 21, in <module>
N, M = [int(e) for e in input().strip().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s965790950 | p01140 | u734301890 | 1522052607 | Python | Python3 | py | Runtime Error | 0 | 0 | 728 | def ans(N, M, h, w):
count = 0
for hr1 in range(N+1):
for hr2 in range(N+1):
if hr2 <= hr1: continue
height = sum(h[e] for e in range(hr1, hr2))
for wr1 in range(M+1):
for wr2 in range(M+1):
if wr2 <= wr1: continue
... | Traceback (most recent call last):
File "/tmp/tmpbgbzbt4f/tmpzerfcxfe.py", line 18, in <module>
N, M = [int(e) for e in input().strip().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s140923269 | p01140 | u734301890 | 1522052725 | Python | Python3 | py | Runtime Error | 0 | 0 | 728 | def ans(N, M, h, w):
count = 0
for hr1 in range(N+1):
for hr2 in range(N+1):
if hr2 <= hr1: continue
height = sum(h[e] for e in range(hr1, hr2))
for wr1 in range(M+1):
for wr2 in range(M+1):
if wr2 <= wr1: continue
... | Traceback (most recent call last):
File "/tmp/tmpgbkf_ooa/tmpp1o_tdwk.py", line 18, in <module>
N, M = [int(e) for e in input().strip().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s661484081 | p01140 | u734301890 | 1522052925 | Python | Python3 | py | Runtime Error | 0 | 0 | 733 | def ans(N, M, h, w):
count = 0
for hr1 in range(N+1):
for hr2 in range(N+1):
if hr2 <= hr1: continue
height = sum(h[e] for e in range(hr1, hr2))
for wr1 in range(M+1):
for wr2 in range(M+1):
if wr2 <= wr1: continue
... | Traceback (most recent call last):
File "/tmp/tmpenfw3wst/tmpxlvo_fi4.py", line 18, in <module>
N, M = [int(e) for e in input().strip().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s084998955 | p01140 | u734301890 | 1522053230 | Python | Python3 | py | Runtime Error | 0 | 0 | 773 | def ans(N, M, h, w):
count = 0
for hr1 in range(N+1):
for hr2 in range(N+1):
if hr2 <= hr1:
continue
height = sum(h[e] for e in range(hr1, hr2))
for wr1 in range(M+1):
for wr2 in range(M+1):
if wr2 <= w... | Traceback (most recent call last):
File "/tmp/tmpke80xru8/tmpi3mqapms.py", line 20, in <module>
N, M = [int(e) for e in input().strip().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s033427147 | p01140 | u269391636 | 1523873064 | Python | Python3 | py | Runtime Error | 0 | 0 | 553 | while(True):
tmp = list(map(int,input().split()))
N, M = tmp[0],tmp[1]
if N == 0:
quit()
hs = [0]
ws = [0]
hlen = []
wlen = []
ans = 0
for i in range(N):
hs.append(hs[-1] + int(input()))
for i in range(M):
ws.append(ws[-1] + int(input()))
for i in rang... | Traceback (most recent call last):
File "/tmp/tmpai5u6tpo/tmpf3ca3e2a.py", line 2, in <module>
tmp = list(map(int,input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s974541369 | p01140 | u584093205 | 1525003996 | Python | Python3 | py | Runtime Error | 0 | 0 | 411 | while(1):
N, M = map(int, input().split())
if N == 0 and M == 0:
break
H = [int(input()) for i in range(N)]
HD = [0] * 1500 ** 2
for i in range(N):
for j in range(i + 1, N + 1):
HD[sum(H[i:j])] += 1
ans = 0
W = [int(input()) for i in range(M)]
for i in range(M... | Traceback (most recent call last):
File "/tmp/tmpj4ru7ssj/tmpxjw1w2t_.py", line 2, in <module>
N, M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s647109466 | p01140 | u316584871 | 1529981266 | Python | Python3 | py | Runtime Error | 0 | 0 | 710 | n,m = map(int, input().split())
while (n != 0 or m != 0):
nlist = []
mlist = []
for i in range(n):
t = int(input())
nlist.append(t)
for i in range(m):
t = int(input())
mlist.append(t)
nsum = []
for i in range(n):
for k in range(n-i):
c = 0... | Traceback (most recent call last):
File "/tmp/tmpdz_08mal/tmpdspwhbbp.py", line 1, in <module>
n,m = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s018492525 | p01140 | u316584871 | 1529982380 | Python | Python3 | py | Runtime Error | 0 | 0 | 601 | n,m = map(int, input().split())
while (n != 0 or m != 0):
nlist = [int(input())for i in range(n)]
mlist = [int(input())for i in range(m)]
nsum = []
for i in range(n):
for k in range(n-i):
c = 0
for l in range(i+1):
c += nlist[k+l]
nsum.append... | Traceback (most recent call last):
File "/tmp/tmp782opavh/tmpcatl4dus.py", line 1, in <module>
n,m = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s473588684 | p01140 | u316584871 | 1529987159 | Python | Python3 | py | Runtime Error | 0 | 0 | 613 | n,m = map(int, input().split())
while (n != 0 or m != 0):
nlist = [0]
mlist = [0]
for i in range(n):
nlist += [nlist[-1] + int(input())]
for i in range(m):
mlist += [mlist[-1] + int(input())]
nsum = []
msum = []
for i in range(n):
for k in range(i+1,n+1):
... | Traceback (most recent call last):
File "/tmp/tmpqi1ix492/tmpbx3d3kl6.py", line 1, in <module>
n,m = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s518419492 | p01140 | u316584871 | 1529987319 | Python | Python3 | py | Runtime Error | 0 | 0 | 598 | n,m = map(int, input().split())
while (n != 0 or m != 0):
nlist = [0]
mlist = [0]
for i in range(n):
nlist += [nlist[-1] + int(input())]
for i in range(m):
mlist += [mlist[-1] + int(input())]
nsum = []
msum = []
count = 0
for i in range(n):
for k in range(i+1,n+1)... | Traceback (most recent call last):
File "/tmp/tmp7khybdem/tmpwicc1tyo.py", line 1, in <module>
n,m = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s780262339 | p01140 | u316584871 | 1529987585 | Python | Python3 | py | Runtime Error | 0 | 0 | 592 | while True:
n,m = map(int, input().split())
if n == 0 and m == 0:
break
nlist = [0]
mlist = [0]
for i in range(n):
nlist += [nlist[-1] + int(input())]
for i in range(m):
mlist += [mlist[-1] + int(input())]
nsum = []
msum = []
count = 0
for i in range(n):
... | Traceback (most recent call last):
File "/tmp/tmpy6dgpj8l/tmpz0306ibn.py", line 2, in <module>
n,m = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s610125876 | p01140 | u109084363 | 1361010871 | Python | Python | py | Runtime Error | 19930 | 47420 | 710 | import sys
import math
import collections
while True:
N, M = map(int, sys.stdin.readline().split())
if N == 0:
break
vertical = collections.Counter()
lateral = collections.Counter()
road_v = []
road_l = []
for i in xrange(N):
h = int(raw_input())
road_v.append(h)
... | File "/tmp/tmpanxwtasm/tmp9gcujqt5.py", line 29
print result
^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s058927331 | p01140 | u109084363 | 1361011051 | Python | Python | py | Runtime Error | 19920 | 47348 | 710 | import sys
import math
import collections
while True:
N, M = map(int, sys.stdin.readline().split())
if N == 0:
break
vertical = collections.Counter()
lateral = collections.Counter()
road_v = []
road_l = []
for i in xrange(N):
h = int(raw_input())
road_v.append(h)
... | File "/tmp/tmpineayzup/tmpe19vozy2.py", line 29
print result
^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s686978559 | p01140 | u109084363 | 1361011485 | Python | Python | py | Runtime Error | 19930 | 47404 | 612 | import sys
import math
import collections
while True:
N, M = map(int, sys.stdin.readline().split())
if N == 0:
break
vertical = collections.Counter()
lateral = collections.Counter()
road_v = []
road_l = []
for i in xrange(N):
h = int(raw_input())
road_v.append(h)
... | Traceback (most recent call last):
File "/tmp/tmpu2gfjvai/tmph2kzjqoi.py", line 6, in <module>
N, M = map(int, sys.stdin.readline().split())
^^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s383548495 | p01140 | u109084363 | 1361011703 | Python | Python | py | Runtime Error | 0 | 0 | 760 | import sys
import math
while True:
N, M = map(int, sys.stdin.readline().split())
if N == 0:
break
vertical = {}
lateral = {}
road_v = []
road_l = []
for i in xrange(N):
h = int(raw_input())
road_v.append(h)
for i in xrange(M):
w = int(raw_input())
... | File "/tmp/tmpm220u5o8/tmp364jzr9c.py", line 30
print result
^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s721227004 | p01140 | u109084363 | 1361011732 | Python | Python | py | Runtime Error | 0 | 0 | 760 | import sys
import math
while True:
N, M = map(int, sys.stdin.readline().split())
if N == 0:
break
vertical = {}
lateral = {}
road_v = []
road_l = []
for i in xrange(N):
h = int(raw_input())
road_v.append(h)
for i in xrange(M):
w = int(raw_input())
... | File "/tmp/tmp24ff_lhm/tmpy7i3qwqq.py", line 30
print result
^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s897482315 | p01140 | u109084363 | 1361011821 | Python | Python | py | Runtime Error | 0 | 0 | 894 | import sys
import math
while True:
N, M = map(int, sys.stdin.readline().split())
if N == 0:
break
vertical = {}
lateral = {}
road_v = []
road_l = []
for i in xrange(N):
h = int(raw_input())
road_v.append(h)
for i in xrange(M):
w = int(raw_input())
... | File "/tmp/tmpnl667qcv/tmpp5gesntw.py", line 36
print result
^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s005102151 | p01140 | u109084363 | 1361011929 | Python | Python | py | Runtime Error | 0 | 0 | 906 | import sys
import math
while True:
N, M = map(int, sys.stdin.readline().split())
if N == 0:
break
vertical = {}
lateral = {}
road_v = []
road_l = []
for i in xrange(N):
h = int(raw_input())
road_v.append(h)
for i in xrange(M):
w = int(raw_input())
... | File "/tmp/tmpb1a6wxoy/tmp4ve5fy2a.py", line 36
print result
^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s313162059 | p01140 | u109084363 | 1361012013 | Python | Python | py | Runtime Error | 19930 | 47120 | 923 | import sys
import math
while True:
N, M = map(int, sys.stdin.readline().split())
if N == 0:
break
vertical = {}
lateral = {}
road_v = []
road_l = []
for i in xrange(N):
h = int(raw_input())
road_v.append(h)
for i in xrange(M):
w = int(raw_input())
... | File "/tmp/tmp0kgz_zt0/tmphob538b1.py", line 37
print result
^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s007877628 | p01140 | u553881259 | 1391346662 | Python | Python | py | Runtime Error | 39860 | 6892 | 689 | from collections import Counter
def add(s, tw):
if tw in s:
s[tw] += 1
else:
s[tw] = 1
while 1:
ws, hs, w, h = {}, {}, [], []
n, m = map(int, raw_input().split())
if n|m == 0: break
for i in range(n):
t = s = input()
add(ws, s)
for pw in reversed(w):
... | File "/tmp/tmpwi4qp03b/tmpvzytdlio.py", line 36
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s054582194 | p01140 | u553881259 | 1391347147 | Python | Python | py | Runtime Error | 39870 | 6892 | 642 | from collections import defaultdict
while 1:
ws, hs, w, h = defaultdict(lambda:0), defaultdict(lambda:0), [], []
n, m = map(int, raw_input().split())
if n|m == 0: break
for i in range(n):
t = s = input()
ws[s]+=1
for pw in reversed(w):
s+=pw
ws[s]+=1
... | File "/tmp/tmp779q50mi/tmppxca9nv9.py", line 29
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s538409255 | p01143 | u672443148 | 1517326892 | Python | Python3 | py | Runtime Error | 0 | 0 | 319 | while True:
N,M,P=map(int,input().split())
if N==M==P: break
divSum=0
for i in range(N):
temp=int(input())
divSum+=temp*100
if i==M-1:
numWin=temp
divSum*=(100-P)/100
if temp!=0:
dividents=int(divSum/numWin)
else: dividents=0
print(dividents)
| Traceback (most recent call last):
File "/tmp/tmptlw98h5t/tmpq7139oe4.py", line 2, in <module>
N,M,P=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s499619637 | p01144 | u741801763 | 1531314014 | Python | Python3 | py | Runtime Error | 0 | 0 | 506 | while 1:
n,m= list(map(int,input().split(' ')))
if n ==m ==0:break
D =[]
for _ in range(n):
d_i,p_i = list(map(int,input().split(' ')))
D.append((d_i,p_i))
sorted(D,key = lambda x:x[0])
while m > 0:
temp = D.pop(0)
if temp[0] > m:
temp = (temp[0] - m,t... | Traceback (most recent call last):
File "/tmp/tmpbsceh805/tmpjn1u4t52.py", line 2, in <module>
n,m= list(map(int,input().split(' ')))
^^^^^^^
EOFError: EOF when reading a line
| |
s465865211 | p01144 | u741801763 | 1531314107 | Python | Python3 | py | Runtime Error | 0 | 0 | 506 | while 1:
n,m= list(map(int,input().split(' ')))
if n ==m ==0:break
D =[]
for _ in range(n):
d_i,p_i = list(map(int,input().split(' ')))
D.append((d_i,p_i))
sorted(D,key = lambda x:x[0])
while m > 0:
temp = D.pop(0)
if temp[0] > m:
temp = (temp[0] - m,t... | Traceback (most recent call last):
File "/tmp/tmprkgfga5q/tmp8n4mabdr.py", line 2, in <module>
n,m= list(map(int,input().split(' ')))
^^^^^^^
EOFError: EOF when reading a line
| |
s626593961 | p01144 | u741801763 | 1531314436 | Python | Python3 | py | Runtime Error | 0 | 0 | 547 | import collections
while 1:
n,m= list(map(int,input().split(' ')))
if n ==m ==0:break
D = collections.deque()
for _ in range(n):
d_i,p_i = list(map(int,input().split(' ')))
D.append((d_i,p_i))
sorted(D,key = lambda x:x[0])
while m > 0:
temp = D.popleft()
if temp[... | Traceback (most recent call last):
File "/tmp/tmpyu0h1dan/tmpedwi0nuf.py", line 3, in <module>
n,m= list(map(int,input().split(' ')))
^^^^^^^
EOFError: EOF when reading a line
| |
s274374224 | p01144 | u741801763 | 1531314484 | Python | Python3 | py | Runtime Error | 0 | 0 | 579 | import collections
import time
while 1:
n,m= list(map(int,input().split(' ')))
if n ==m ==0:break
D = collections.deque()
time.sleep(20)
for _ in range(n):
d_i,p_i = list(map(int,input().split(' ')))
D.append((d_i,p_i))
sorted(D,key = lambda x:x[0])
while m > 0:
tem... | Traceback (most recent call last):
File "/tmp/tmpmugr7463/tmp8pgtz68j.py", line 4, in <module>
n,m= list(map(int,input().split(' ')))
^^^^^^^
EOFError: EOF when reading a line
| |
s527660860 | p01144 | u741801763 | 1531314803 | Python | Python3 | py | Runtime Error | 0 | 0 | 577 | import collections
while 1:
n,m= list(map(int,input().split(' ')))
if n == m ==0:break
D = collections.deque()
for _ in range(n):
d_i,p_i = list(map(int,input().split(' ')))
if p_i !=0:
D.append((d_i,p_i))
sorted(D,key = lambda x:x[0])
while m > 0:
temp = D.... | Traceback (most recent call last):
File "/tmp/tmpy3tm05mw/tmpde5odj1b.py", line 3, in <module>
n,m= list(map(int,input().split(' ')))
^^^^^^^
EOFError: EOF when reading a line
| |
s286364605 | p01144 | u025180675 | 1540437324 | Python | Python3 | py | Runtime Error | 0 | 0 | 523 | while True:
N,M = map(int,input().strip().split(" "))
if [N,M] == [0,0]:
break
L = []
S = 0
for i in range(N):
l = list(map(int,input().strip().split(" ")))
l.reverse()
L.append(l)
S = S + l[0]*l[1]
L.sort()
j = 0
while M > 0:
if M >= L[N... | Traceback (most recent call last):
File "/tmp/tmpe05bq2b0/tmpi44ptgre.py", line 2, in <module>
N,M = map(int,input().strip().split(" "))
^^^^^^^
EOFError: EOF when reading a line
| |
s609591183 | p01144 | u025180675 | 1540441835 | Python | Python3 | py | Runtime Error | 0 | 0 | 1084 | #Princess's Marriage
#http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=2019&lang=jp
#席の位置:右中央
#Nは区間の個数
#Mは予算
#Dは区間の距離
#Pはその間を1単位距離移動したときに襲われる回数の期待値
#お姫様が予算Mを持っていて,刺客に襲われる回数の期待値が最小になるように護衛を雇ったときの,目的地までに刺客に襲われる回数の期待値
while True:
N,M = map(int,input().strip().split(" "))
if [N,M] == [0,0]:
brea... | Traceback (most recent call last):
File "/tmp/tmpjm9l5o43/tmpbyopsdhh.py", line 14, in <module>
N,M = map(int,input().strip().split(" "))
^^^^^^^
EOFError: EOF when reading a line
| |
s001588251 | p01144 | u025180675 | 1540447283 | Python | Python3 | py | Runtime Error | 0 | 0 | 628 | while True:
N,M = map(int,input().strip().split(" "))
if [N,M] == [0,0]:
break
L = []
S = 0 #Sが襲われる回数の期待値
for i in range(N):
l = list(map(int,input().strip().split(" ")))
l.reverse() #ソートするとき具合がわるいので[P,D]の順に入れ替え
L.append(l)
S = S + l[0]*l[1]
L.sort()
j... | Traceback (most recent call last):
File "/tmp/tmpzaye7z_1/tmpenzikkb3.py", line 2, in <module>
N,M = map(int,input().strip().split(" "))
^^^^^^^
EOFError: EOF when reading a line
| |
s308647786 | p01144 | u025180675 | 1540465499 | Python | Python3 | py | Runtime Error | 0 | 0 | 606 | while True:
N,M = map(int,input().strip().split(" "))
if [N,M] == [0,0]:
break
L = []
S = 0 #Sが襲われる回数の期待値
for i in range(N):
l = list(map(int,input().strip().split(" ")))
l.reverse() #ソートするとき具合がわるいので[P,D]の順に入れ替え
L.append(l)
S = S + l[0]*l[1]
L.sort()
j... | Traceback (most recent call last):
File "/tmp/tmpp3bthans/tmpflaqfb50.py", line 2, in <module>
N,M = map(int,input().strip().split(" "))
^^^^^^^
EOFError: EOF when reading a line
| |
s708280800 | p01144 | u698762975 | 1555929959 | Python | Python3 | py | Runtime Error | 0 | 0 | 304 | n,m=map(int,input().split())
l=[]
for i in range(n):
l1=list(map(input().split()))
l1=l1[::-1]
l.append(l1)
l=sorted(l)
s=0
for i in range(n):
s+=l[i][0]*l[i][1]
for i in range(n):
if m-l[i][1]>=0:
s-=l[i][0]*l[i][1]
m-=l[i][1]
else:
s-=l[i][0]*m
print(s)
| Traceback (most recent call last):
File "/tmp/tmp88zzpanc/tmpviyp4k_b.py", line 1, in <module>
n,m=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s958678746 | p01144 | u026821956 | 1555930899 | Python | Python3 | py | Runtime Error | 0 | 0 | 395 | while True:
N,M = map(int,input().split())
if N == M == 0:
break
else:
L = []
for i in range(N):
L.append(list(map(int,input().split())))
L = sorted(L, key = lambda x:x[1])
L.reverse()
ans = 0
for i in range(len(L)):
if M > 0:
if M-L[i][0] >= 0:
M -= L[i][0]
else:
ans += (L[i][0]... | File "/tmp/tmp9mj41eum/tmpy7jlhe58.py", line 7
for i in range(N):
TabError: inconsistent use of tabs and spaces in indentation
| |
s950442291 | p01144 | u910909659 | 1555990562 | Python | Python3 | py | Runtime Error | 0 | 0 | 711 | while True:
N,M = map(int,input().split())
if N == 0:
break
expect = 0
a = []
exsum = 0
for i in range(N): #二次元配列を作る
a.append(list(map(int,input().split())))
exsum += a[i][0]*a[i][1] #誰も雇わなかった場合の期待値
b = sorted(a, key=lambda x: x[1]) #危険度の高い区間ほど後ろにくるように並べる
i = N-1
... | Traceback (most recent call last):
File "/tmp/tmpd6a1dcop/tmpr4db131d.py", line 2, in <module>
N,M = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s088856343 | p01144 | u910909659 | 1555990615 | Python | Python3 | py | Runtime Error | 0 | 0 | 711 | while True:
N,M = map(int,input().split())
if N == 0:
break
expect = 0
a = []
exsum = 0
for i in range(N): #二次元配列を作る
a.append(list(map(int,input().split())))
exsum += a[i][0]*a[i][1] #誰も雇わなかった場合の期待値
b = sorted(a, key=lambda x: x[1]) #危険度の高い区間ほど後ろにくるように並べる
i = N-1
... | Traceback (most recent call last):
File "/tmp/tmpqy3p3kf2/tmp18wszb2d.py", line 2, in <module>
N,M = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s710683311 | p01144 | u910909659 | 1555990926 | Python | Python3 | py | Runtime Error | 0 | 0 | 711 | while True:
N,M = map(int,input().split())
if N == 0:
break
expect = 0
a = []
exsum = 0
for i in range(N): #二次元配列を作る
a.append(list(map(int,input().split())))
exsum += a[i][0]*a[i][1] #誰も雇わなかった場合の期待値
b = sorted(a, key=lambda x: x[1]) #危険度の高い区間ほど後ろにくるように並べる
i = N-1
... | Traceback (most recent call last):
File "/tmp/tmpqbh9074l/tmp6wom4a98.py", line 2, in <module>
N,M = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s815272883 | p01144 | u528682978 | 1556001897 | Python | Python3 | py | Runtime Error | 0 | 0 | 417 | while True:
res=0
n,m = map(int,input().split())
if n == 0:
break
DandP = []
for _ in range(n):
DandP.append(list(map(int,input().split())))
DandP.sort(key=lambda x:x[1],reverse = True)
for _ in range(m):
if DandP[0][0]==0:
DandP = DandP[1:]
DandP[... | Traceback (most recent call last):
File "/tmp/tmp5ixi98kk/tmpinhhgugg.py", line 3, in <module>
n,m = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s790262259 | p01144 | u528682978 | 1556003480 | Python | Python3 | py | Runtime Error | 0 | 0 | 448 | while True:
res=0
n,m = map(int,input().split())
if n == 0:
break
DandP = []
for _ in range(n):
DandP.append(list(map(int,input().split())))
DandP.sort(key=lambda x:x[1],reverse = True)
for _ in range(m):
if DandP[0][0]==0:
DandP = DandP[1:]
if len... | Traceback (most recent call last):
File "/tmp/tmpxmg5wm0a/tmp0dns6t2a.py", line 3, in <module>
n,m = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s873810204 | p01144 | u844945939 | 1414411698 | Python | Python | py | Runtime Error | 0 | 0 | 408 | while True:
n, m = (int(s) for s in input().split())
if not n:
break
sections = sorted(([int(s) for s in input().split()] for i in range(n)),
key=lambda x: x[1], reverse=True)
for i, (d, p) in enumerate(sections):
m -= d
if m <= 0:
print(sum(s[... | Traceback (most recent call last):
File "/tmp/tmp_h5zq9oa/tmpki9ftw4f.py", line 2, in <module>
n, m = (int(s) for s in input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s219275050 | p01144 | u124909914 | 1426650468 | Python | Python3 | py | Runtime Error | 0 | 0 | 355 | while True:
n, m = map(int, input().split())
ls = []
if n == 0: break
for i in range(n):
d, p = map(int, input().split())
ls.append([d,p])
ls.sort(key=lambda x:x[1], reverse=True)
j = 0
for i in range(m):
ls[j][0] -= 1
if ls[j][0] == 0:
j += 1
... | Traceback (most recent call last):
File "/tmp/tmpsbbnbaeu/tmpnvudow4b.py", line 2, in <module>
n, m = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s264641113 | p01144 | u124909914 | 1426665004 | Python | Python3 | py | Runtime Error | 19930 | 8148 | 408 | while True:
n, m = map(int, input().split())
ls = []
if n == 0: break
for i in range(n):
d, p = map(int, input().split())
ls.append([d,p])
ls.sort(key=lambda x:x[1], reverse=True)
j = 0
for i in range(m):
ls[j][0] -= 1
if ls[j][0] == 0:
j += 1
... | Traceback (most recent call last):
File "/tmp/tmp8z2exkjd/tmptmjjpk7q.py", line 2, in <module>
n, m = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s943390069 | p01144 | u797180951 | 1438485116 | Python | Python | py | Runtime Error | 0 | 0 | 362 | loop {
n, m = gets.split.map &:to_i
break if n == 0
road = (1..n).map{ gets.split.map &:to_i }
road.sort_by!(&:last).reverse!
while !road.empty?
if road[0][0] > m
road[0][0] -= m
break
else
m -= road[0][0]
road.shift
end
end... | File "/tmp/tmpz_bl5n5g/tmplk4mkknb.py", line 2
n, m = gets.split.map &:to_i
^^^^^^^^^^^^^^^^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s326753517 | p01144 | u797180951 | 1438485212 | Python | Python | py | Runtime Error | 0 | 0 | 366 | loop {
n, m = gets.split.map &:to_i
break if n == 0
road = (1..n).map{ gets.split.map &:to_i }
road.sort_by!(&:last).reverse!
while !road.empty?
if road[0][0] > m
road[0][0] -= m
break
else
m -= road[0][0]
road.shift
end
end... | File "/tmp/tmp92m7_ae6/tmppfbqff6d.py", line 2
n, m = gets.split.map &:to_i
^^^^^^^^^^^^^^^^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s649295086 | p01144 | u798803522 | 1470240170 | Python | Python3 | py | Runtime Error | 0 | 0 | 568 | roadcnt,money = (int(n) for n in input().split(" "))
while True:
road = []
for r in range(roadcnt):
road.append([int(n) for n in input().split(" ")])
road = sorted(road,key=lambda x:x[1])
while money > 0:
if road[-1][0] - money < 0:
money -= road[-1][0]
road.pop()... | Traceback (most recent call last):
File "/tmp/tmp4i64b5js/tmpq5rqs8lj.py", line 1, in <module>
roadcnt,money = (int(n) for n in input().split(" "))
^^^^^^^
EOFError: EOF when reading a line
| |
s194907328 | p01144 | u947762778 | 1508048829 | Python | Python3 | py | Runtime Error | 40000 | 9276 | 544 | while True:
n, m = map(int, input().split())
dpList = []
if n + m < 1:
break
for i in range(n):
row = list(map(int,input().split()))
dpList.append(row)
dpList = sorted(dpList, key = lambda x:x[1], reverse = True)
for i in range(n):
if m - dpList[i][0] <= 0:
... | Traceback (most recent call last):
File "/tmp/tmp7vf7fvjm/tmpjgv4jqk5.py", line 2, in <module>
n, m = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s098038288 | p01144 | u947762778 | 1508049273 | Python | Python3 | py | Runtime Error | 40000 | 9260 | 436 | while True:
n, m = map(int, input().split())
dpList = []
if n + m < 1:
break
for i in range(n):
row = list(map(int,input().split()))
dpList.append(row)
dpList = sorted(dpList, key = lambda x:x[1], reverse = True)
num = 0
for i in range(n):
if m >= dpList[i... | Traceback (most recent call last):
File "/tmp/tmprtmqzgyi/tmp6re4e__q.py", line 2, in <module>
n, m = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s336846157 | p01144 | u947762778 | 1508049349 | Python | Python3 | py | Runtime Error | 0 | 0 | 339 | while True:
n, m = map(int, input().split())
if (n, m) == (0, 0):
break
dp = [list(map(int, input().split())) for i in range(n)]
dp = sorted(dp, key=lambda kv:kv[1], reverse=True)
r = 0
for d,p in dp:
if m >= d:
m -= d
else:
r += p*(d-m)
... | File "/tmp/tmp7bt13dmi/tmplb6qulem.py", line 14
print(r
^
SyntaxError: '(' was never closed
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.