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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s673009871 | p00713 | u685815919 | 1481271946 | Python | Python | py | Runtime Error | 40000 | 9868 | 772 | import math
while True:
n=int(raw_input())
if n==0: break
if n==1:
raw_input()
print 1
continue
p=[]
for _ in xrange(n):
x,y=raw_input().split()
p.append((float(x),float(y)))
cs=[]
for i in xrange(n-1):
for j in xrange(i+1,n):
v=(p[j][0]-p[i][0], p[j][1]-p[i][1])
l=math... | File "/tmp/tmpx1r4kyv6/tmplki_ntk3.py", line 7
print 1
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s753794503 | p00713 | u269391636 | 1529317106 | Python | Python3 | py | Runtime Error | 0 | 0 | 747 | def cent(p1,p2):
if abs(p1-p2) >= 2:
return None,None
else:
q = (p1+p2)/2
r = (p1-p2)
n = abs(p1-p2)
t = r * 1j * ((1-r*2)**0.5/r)
return(q + t, q - t)
while(True):
ans = 0
n = int(input())
ps = []
for _ in range(n):
x,y = map(int,input().... | Traceback (most recent call last):
File "/tmp/tmpo8xulz6k/tmpv8boa_ir.py", line 13, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s833596879 | p00713 | u269391636 | 1529337625 | Python | Python3 | py | Runtime Error | 0 | 0 | 789 | def cent(p1,p2):
if abs(p1-p2) >= 2:
return None,None
else:
q = (p1+p2)/2
r = (p1-p2)/2
n = abs(r)
t = r * 1j * ((1-n**2)**0.5/n)
return(q + t, q - t)
while(True):
ans = 0
n = int(input())
if n == 0:
quit()
ps = []
for _ in range(n):
... | Traceback (most recent call last):
File "/tmp/tmpmb907mdb/tmpmuskct1z.py", line 13, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s868338305 | p00713 | u269391636 | 1529337842 | Python | Python3 | py | Runtime Error | 0 | 0 | 789 | def cent(p1,p2):
if abs(p1-p2) >= 2:
return None,None
else:
q = (p1+p2)/2
r = (p1-p2)/2
n = abs(r)
t = r * 1j * ((1-n**2)**0.5/n)
return(q + t, q - t)
while(True):
ans = 1
n = int(input())
if n == 0:
quit()
ps = []
for _ in range(n):
... | Traceback (most recent call last):
File "/tmp/tmpiu0f4qgd/tmpacbkc8m1.py", line 13, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s329048031 | p00713 | u467175809 | 1530264912 | Python | Python | py | Runtime Error | 0 | 0 | 1102 | #!/usr/bin/env python
from collections import deque
import itertools as it
import sys
import math
sys.setrecursionlimit(1000000)
while True:
N = input()
if N == 0:
break
pos = []
for loop in range(N):
S = map(float, raw_input().split())
pos.append(S)
ans = 0
for i in r... | File "/tmp/tmp_z3fkk2_/tmpvo3294aj.py", line 40
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s335330208 | p00713 | u467175809 | 1530265251 | Python | Python | py | Runtime Error | 0 | 0 | 1288 | #!/usr/bin/env python
from collections import deque
import itertools as it
import sys
import math
sys.setrecursionlimit(1000000)
def func():
while True:
N = input()
if N == 0:
break
pos = []
for loop in range(N):
S = map(float, raw_input().split())
... | File "/tmp/tmp8ybey9tj/tmptfq9bzwo.py", line 43
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s504332358 | p00713 | u467175809 | 1530265935 | Python | Python | py | Runtime Error | 0 | 0 | 1277 | #!/usr/bin/env python
from collections import deque
import itertools as it
import sys
import math
sys.setrecursionlimit(1000000)
def func():
while True:
N = input()
if N == 0:
break
R = range(N)
pos = []
for loop in R:
S = map(float, raw_input().spl... | File "/tmp/tmp4rt324nf/tmpaa4a3vvb.py", line 42
print max(1, ans)
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s680734073 | p00713 | u467175809 | 1530266091 | Python | Python3 | py | Runtime Error | 0 | 0 | 1278 | #!/usr/bin/env python
from collections import deque
import itertools as it
import sys
import math
sys.setrecursionlimit(1000000)
def func():
while True:
N = input()
if N == 0:
break
R = range(N)
pos = []
for loop in R:
S = map(float, raw_input().spl... | Traceback (most recent call last):
File "/tmp/tmpahgjtl1d/tmpnehvjll4.py", line 45, in <module>
func()
File "/tmp/tmpahgjtl1d/tmpnehvjll4.py", line 12, in func
N = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s992197695 | p00713 | u467175809 | 1530266299 | Python | Python3 | py | Runtime Error | 0 | 0 | 1285 | #!/usr/bin/env python
from collections import deque
import itertools as it
import sys
import math
sys.setrecursionlimit(1000000)
def func():
while True:
N = int(input())
if N == 0:
break
R = range(N)
pos = []
for loop in R:
S = list(map(float, input... | Traceback (most recent call last):
File "/tmp/tmp4_aol_58/tmpqm9ucqp2.py", line 45, in <module>
func()
File "/tmp/tmp4_aol_58/tmpqm9ucqp2.py", line 12, in func
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s889626725 | p00713 | u467175809 | 1530266641 | Python | Python3 | py | Runtime Error | 0 | 0 | 1429 | #!/usr/bin/env python
from collections import deque
import itertools as it
import sys
import math
sys.setrecursionlimit(1000000)
def func():
lst = []
while True:
S = input()
lst.append(S)
if S == '0':
break
lst = list(reversed(lst))
while True:
N = int(lst.... | Traceback (most recent call last):
File "/tmp/tmpn5azhevi/tmptmy2qqn5.py", line 52, in <module>
func()
File "/tmp/tmpn5azhevi/tmptmy2qqn5.py", line 13, in func
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s477127082 | p00713 | u467175809 | 1530266705 | Python | Python3 | py | Runtime Error | 0 | 0 | 1333 | #!/usr/bin/env python
import math
def func():
lst = []
while True:
S = input()
lst.append(S)
if S == '0':
break
lst = list(reversed(lst))
while True:
N = int(lst.pop())
if N == 0:
break
R = range(N)
pos = []
for lo... | Traceback (most recent call last):
File "/tmp/tmpn3zrlrbc/tmpr34vfm0t.py", line 47, in <module>
func()
File "/tmp/tmpn3zrlrbc/tmpr34vfm0t.py", line 8, in func
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s011781794 | p00713 | u467175809 | 1530267909 | Python | Python3 | py | Runtime Error | 0 | 0 | 1433 | #!/usr/bin/env python
from collections import deque
import itertools as it
import sys
import math
sys.setrecursionlimit(1000000)
def func():
lst = []
while True:
S = input()
lst.append(S)
if S == '0':
break
lst = list(reversed(lst))
while True:
N = int(lst.... | Traceback (most recent call last):
File "/tmp/tmp83cs7vga/tmp7lyfgvvw.py", line 51, in <module>
func()
File "/tmp/tmp83cs7vga/tmp7lyfgvvw.py", line 13, in func
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s510064682 | p00713 | u269391636 | 1530559889 | Python | Python3 | py | Runtime Error | 0 | 0 | 794 | def cent(p1,p2):
if abs(p1-p2) >= 2:
return None,None
else:
q = (p1+p2)/2
r = (p1-p2)/2
n = abs(r)
t = r * 1j * ((1-n**2)**0.5/n)
return(q + t, q - t)
while(True):
ans = 1
n = int(input())
if n == 0:
quit()
ps = []
for _ in range(n):
... | Traceback (most recent call last):
File "/tmp/tmp2i5ew2jr/tmpqmw7fq9t.py", line 13, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s730563198 | p00713 | u269391636 | 1530559980 | Python | Python3 | py | Runtime Error | 0 | 0 | 828 | def cent(p1,p2):
if abs(p1-p2) >= 2:
return None,None
else:
q = (p1+p2)/2
r = (p1-p2)/2
n = abs(r)
t = r * 1j * ((1-n**2)**0.5/n)
return(q + t, q - t)
while(True):
ans = 1
n = int(input())
if n == 0:
quit()
elif n == 1:
print(1)
... | Traceback (most recent call last):
File "/tmp/tmpxhxthn6s/tmpqivqvpbi.py", line 13, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s175181314 | p00713 | u269391636 | 1530560169 | Python | Python3 | py | Runtime Error | 0 | 0 | 876 | def cent(p1,p2):
if abs(p1-p2) >= 2:
return None,None
else:
q = (p1+p2)/2
r = (p1-p2)/2
n = abs(r)
if n == 0:
return None,None
t = r * 1j * ((1-n**2)**0.5/n)
return(q + t, q - t)
while(True):
ans = 1
n = int(input())
if n == 0:
... | Traceback (most recent call last):
File "/tmp/tmp9333xe8u/tmp8ou8pkn0.py", line 15, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s227291516 | p00713 | u269391636 | 1530560592 | Python | Python3 | py | Runtime Error | 0 | 0 | 940 | def cent(p1,p2):
if abs(p1-p2) >= 2:
return None,None
else:
q = (p1+p2)/2
r = (p1-p2)/2
n = abs(r)
if n == 0:
return None,None
t = r * 1j * ((1-n**2)**0.5/n)
return(q + t, q - t)
def abs(x):
return(((x.real) ** 2 + (x.imag) ** 2) ** 0.5)
... | Traceback (most recent call last):
File "/tmp/tmpbc_5wdxz/tmpvcs45ftf.py", line 18, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s867185790 | p00713 | u633068244 | 1399890687 | Python | Python | py | Runtime Error | 39860 | 6164 | 342 | import random
ans = 0
while 1:
n = input()
if n == 0: break
xy = [map(float,raw_input().split()) for i in range(n)]
for r in range(20000):
cx,cy = 10*random.random(),10*random.random()
cur = 0
for i in range(n):
x,y = xy[i]
if (cx-x)**2 + (cy-y)**2 <= 1:
cur += 1
if n - cur < ans: break
ans = m... | File "/tmp/tmptd29j_xr/tmpfzr5ty50.py", line 16
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s473453105 | p00717 | u338932851 | 1456231234 | Python | Python | py | Runtime Error | 0 | 0 | 1402 | import sys
while(True):
n=int(raw_input())
if (n==0):break
Map=[]
for i in range(n+1):
m=int(raw_input())
res=[]
for j in range(m):
x = map(int, sys.stdin.readline().replace('\n','').split(' '))
res.append(complex(x[0],x[1]))
Map.append(res)
... | File "/tmp/tmp5psxnsem/tmpzxd2xjn1.py", line 31
if (success):print i; flag=False; break
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s738641828 | p00717 | u338932851 | 1456231454 | Python | Python | py | Runtime Error | 0 | 0 | 1402 | import sys
while(True):
n=int(raw_input())
if (n==0):break
Map=[]
for i in range(n+1):
m=int(raw_input())
res=[]
for j in range(m):
x = map(int, sys.stdin.readline().replace('\n','').split(' '))
res.append(complex(x[0],x[1]))
Map.append(res)
... | File "/tmp/tmp623f0u67/tmp59wqe0xz.py", line 31
if (success):print i; flag=False; break
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s695771989 | p00717 | u338932851 | 1456231468 | Python | Python | py | Runtime Error | 0 | 0 | 1402 | import sys
while(True):
n=int(raw_input())
if (n==0):break
Map=[]
for i in range(n+1):
m=int(raw_input())
res=[]
for j in range(m):
x = map(int, sys.stdin.readline().replace('\n','').split(' '))
res.append(complex(x[0],x[1]))
Map.append(res)
... | File "/tmp/tmpimjn1epb/tmpxenen3wz.py", line 31
if (success):print i; flag=False; break
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s275808440 | p00717 | u338932851 | 1456231621 | Python | Python | py | Runtime Error | 0 | 0 | 1402 | import sys
while(True):
n=int(raw_input())
if (n==0):break
Map=[]
for i in range(n+1):
m=int(raw_input())
res=[]
for j in range(m):
x = map(int, sys.stdin.readline().replace('\n','').split(' '))
res.append(complex(x[0],x[1]))
Map.append(res)
... | File "/tmp/tmpco5w8an1/tmp1wh6_fcl.py", line 31
if (success):print i; flag=False; break
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s192468749 | p00718 | u328199937 | 1555848948 | Python | Python | py | Runtime Error | 0 | 0 | 1237 | ans_list = []
n = int(input())
def mcxl2digit(s):
ans = 0
dig = 1
for i in range(len(s)):
if "2" <= s[i] <= "9":
dig = int(s[i])
else:
if s[i] == "m":
key = 100
elif s[i] == "c":
key = 100
elif s[i] == "x":
... | Traceback (most recent call last):
File "/tmp/tmp7j8_9umv/tmpncfgbwy0.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s608000389 | p00719 | u352394527 | 1530788583 | Python | Python3 | py | Runtime Error | 0 | 0 | 1061 | from heapq import heappush, heappop
from itertools import permutations
INF = 10 ** 20
while True:
n, m, p, a, b = map(int, input().split())
if n == 0:
break
a -= 1
b -= 1
tlst = list(map(int, input().split()))
edges = [[] for _ in range(m)]
for _ in range(p):
x, y, z = map(int, input().split())
... | Traceback (most recent call last):
File "/tmp/tmppuvf81v0/tmp89rzha0b.py", line 6, in <module>
n, m, p, a, b = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s732269518 | p00721 | u075842827 | 1499944379 | Python | Python3 | py | Runtime Error | 40000 | 13104 | 2092 | # -*- coding: utf-8 -*-
import sys
import subprocess
import json
import time
import math
import re
import sqlite3
import random
from queue import Queue
dy = [0, 0, 1, -1]
dx = [1, -1, 0, 0]
INF = int(1e20)
class Point:
def __init__(self, y, x, distance = 0):
self.y = y
self.x = x
self.dis... | Traceback (most recent call last):
File "/tmp/tmp77peefar/tmp79s6soe0.py", line 67, in <module>
w, h = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s743525753 | p00721 | u075842827 | 1499944587 | Python | Python3 | py | Runtime Error | 40000 | 13096 | 2090 | # -*- coding: utf-8 -*-
import sys
import subprocess
import json
import time
import math
import re
import sqlite3
import random
from queue import Queue
dy = [0, 0, 1, -1]
dx = [1, -1, 0, 0]
INF = int(1e20)
class Point:
def __init__(self, y, x, distance = 0):
self.y = y
self.x = x
self.dis... | Traceback (most recent call last):
File "/tmp/tmpuoivi12e/tmp55kaj88y.py", line 67, in <module>
w, h = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s482661657 | p00721 | u352394527 | 1529663735 | Python | Python3 | py | Runtime Error | 0 | 0 | 1507 | from heapq import heappush, heappop
INF = 10 ** 20
direct = ((0, -1), (0, 1), (-1, 0), (1, 0))
def dist(fr, to, mp):
que = []
heappush(que, (0, fr))
visited = [[False] * len(mp[0]) for _ in range(len(mp))]
visited[fr[1]][fr[0]] = True
while que:
d, point = heappop(que)
x, y = point
for dx, dy in... | Traceback (most recent call last):
File "/tmp/tmpv4h0nbez/tmp5aj3cyqs.py", line 34, in <module>
w, h = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s259180139 | p00721 | u352394527 | 1529665299 | Python | Python3 | py | Runtime Error | 0 | 0 | 1708 | from heapq import heappush, heappop
INF = 10 ** 10
direct = ((0, -1), (0, 1), (-1, 0), (1, 0))
def dist(fr, to, mp):
que = []
heappush(que, (0, fr))
visited = [[False] * len(mp[0]) for _ in range(len(mp))]
visited[fr[1]][fr[0]] = True
while que:
d, point = heappop(que)
x, y = point
for dx, dy in... | Traceback (most recent call last):
File "/tmp/tmpwn2reaxb/tmpn35aj1zv.py", line 70, in <module>
main()
File "/tmp/tmpwn2reaxb/tmpn35aj1zv.py", line 37, in main
w, h = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s728506655 | p00721 | u779627195 | 1354898045 | Python | Python | py | Runtime Error | 0 | 5068 | 1734 | import sys
from Queue import Queue
R = lambda:map(int,raw_input().split())
MAX = 10000000
dirt = []
dx = [0,1,0,-1]
dy = [1,0,-1,0]
def CalcCost(start):
global visited
cost = [[MAX for j in xrange(w)] for i in xrange(h)]
cost[start[1]][start[0]] = 0
q = Queue()
q.put(start)
while not q.empty()... | File "/tmp/tmparesr0__/tmpfduc6435.py", line 63
print distance
^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s124692856 | p00723 | u338932851 | 1456382655 | Python | Python | py | Runtime Error | 0 | 0 | 530 | =int(raw_input())
def comb(tr):
l=len(tr)
res=[]
for i in range(l):
head,tail=tr[i:],tr[:i]
headrev=head[::-1]
tailrev=tail[::-1]
res.append(head+tail)
res.append(headrev+tail)
res.append(head+tailrev)
res.append(headrev+tailrev)
res.append(ta... | File "/tmp/tmp7fr7oa05/tmp703oh3pd.py", line 1
=int(raw_input())
^
SyntaxError: invalid syntax
| |
s439750820 | p00724 | u479246559 | 1381985764 | Python | Python | py | Runtime Error | 39870 | 4160 | 16 | while(1):
pass | ||
s073973375 | p00725 | u488601719 | 1452678321 | Python | Python | py | Runtime Error | 0 | 0 | 1920 | dx = [1, -1, 0, 0]
dy = [0, 0, 1, -1]
def dfs(x, y, cnt):
global board, W, H, ans
if ans <= cnt:
return
for i in range(4):
mx, my = x, y
mx += dx[i]
my += dy[i]
if 0 > mx or 0 > my or W <= mx or H <= my:
continue
if board[my][mx] == 1:
... | File "/tmp/tmp5htqex1u/tmpc8igy7qw.py", line 49
print ans if ans < 11 else - 1
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s861557926 | p00725 | u420446254 | 1520611286 | Python | Python3 | py | Runtime Error | 0 | 0 | 1965 |
dx = [0, 1, 0, -1]
dy = [1, 0, -1, 0]
N_MOVE = 4
EMPTY = 0
ROCK = 1
START = 2
GOAL = 3
INF = 100000
def in_field(field, x, y):
return y >=0 and y < len(field) and x >= 0 and x< len(field[0])
def move_to_rock(field, x, y, direction):
while(True):
x += dx[direction]
y += dy[direction]
... | Traceback (most recent call last):
File "/tmp/tmpgjkpfsqk/tmpr2hm3cyz.py", line 82, in <module>
answer = solve()
^^^^^^^
File "/tmp/tmpgjkpfsqk/tmpr2hm3cyz.py", line 69, in solve
w, h = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s508325891 | p00725 | u269391636 | 1529250637 | Python | Python3 | py | Runtime Error | 0 | 0 | 3159 | from queue import Queue as q
from copy import deepcopy as cp
def l_move(data):
global flag
field,n,i,j = data[0],data[1],data[2],data[3]
if j == 0 or field[i][j-1] == 1 or n == 0:
return(None)
field[i] = cp(field[i])
while(j):
if field[i][j-1] == 0:
field[i][j] = 0
... | Traceback (most recent call last):
File "/tmp/tmpk1q_v0u7/tmp_nr1ys30.py", line 95, in <module>
y,x = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s055716418 | p00726 | u467175809 | 1530260620 | Python | Python | py | Runtime Error | 0 | 0 | 1936 | #!/usr/bin/env python
from collections import deque
import itertools as it
import sys
sys.setrecursionlimit(1000000)
def check(c):
return (ord(c) >= ord('0') and ord(c) <= ord('9'))
while True:
S1, S2 = raw_input().split()
if S1 == '0':
break
N = int(S2)
SS = ''
flag = False
for ... | File "/tmp/tmp5vyafibz/tmp1q50jxig.py", line 78
print '0'
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s844617717 | p00726 | u915761101 | 1369792428 | Python | Python | py | Runtime Error | 0 | 0 | 2624 | #include <vector>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstr... | File "/tmp/tmp9drj3n_6/tmphxvdqzsj.py", line 22
using namespace std;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s107458242 | p00728 | u637657888 | 1555918536 | Python | Python3 | py | Runtime Error | 0 | 0 | 462 | def tax(p,x):
return p*(100+x) // 100 # 整数除算
def solve(X,Y,S):
for a in range(1,S):
for b in range(1,S):
sum = tax(a,X)+tax(b,X)
if sum == S:
# 新税でのtax(a,Y)+tax(b,Y) について検討
if sum > S:
break
# b増加ならばsum増加のため1
return best
while True:
... | Traceback (most recent call last):
File "/tmp/tmpsewtbuyx/tmpuz8bdcmq.py", line 14, in <module>
X,Y,S = map(int, input().strip().split(''))
^^^^^^^
EOFError: EOF when reading a line
| |
s867441398 | p00728 | u637657888 | 1555918601 | Python | Python3 | py | Runtime Error | 0 | 0 | 458 | def tax(p,x):
return p*(100+x) // 100 # 整数除算
def solve(X,Y,S):
for a in range(1,S):
for b in range(1,S):
sum = tax(a,X)+tax(b,X)
if sum == S:
# 新税でのtax(a,Y)+tax(b,Y) について検討
if sum > S:
break
# b増加ならばsum増加のため1
return best
while True:
X,Y,... | File "/tmp/tmp1lttt1h8/tmpy9h1mlju.py", line 9
if sum > S:
^
IndentationError: expected an indented block after 'if' statement on line 7
| |
s951850917 | p00728 | u637657888 | 1555919011 | Python | Python3 | py | Runtime Error | 0 | 0 | 454 | def tax(p,x):
return p*(100+x) // 100 # 整数除算
def solve(X,Y,S):
for a in range(1,S):
for b in range(1,S):
sum = tax(a,X)+tax(b,X)
if sum == S:
# 新税でのtax(a,Y)+tax(b,Y) について検討
if sum > S:
break
# b増加ならばsum増加のため1
return best
while True:
X,Y,S = ... | File "/tmp/tmp9rl9u3cf/tmpnq0xvgvb.py", line 9
if sum > S:
^
IndentationError: expected an indented block after 'if' statement on line 7
| |
s940243098 | p00728 | u637657888 | 1555919112 | Python | Python3 | py | Runtime Error | 0 | 0 | 348 | def tax(p,x):
return p*(100+x) // 100
def solve(X,Y,S):
for a in range(1,S):
for b in range(1,S):
sum = tax(a,X)+tax(b,X)
if sum == S:
if sum > S:
break
return best
while True:
X,Y,S = map(int, input().strip().split(''))
if X == 0:
... | File "/tmp/tmp9hr4z23n/tmp90pamke_.py", line 8
if sum > S:
^
IndentationError: expected an indented block after 'if' statement on line 7
| |
s732253592 | p00728 | u637657888 | 1555919187 | Python | Python3 | py | Runtime Error | 0 | 0 | 383 | def tax(p,x):
return p*(100+x) // 100
def solve(X,Y,S):
for a in range(1,S):
for b in range(1,S):
sum = tax(a,X)+tax(b,X)
if sum == S:
tax(a,Y)+tax(b,Y)
if sum > S:
break
return best
while True:
X,Y,S = map(int, input().strip(... | Traceback (most recent call last):
File "/tmp/tmp6jm0jajk/tmppfdjrz23.py", line 13, in <module>
X,Y,S = map(int, input().strip().split(''))
^^^^^^^
EOFError: EOF when reading a line
| |
s948026000 | p00728 | u715278210 | 1556601781 | Python | Python3 | py | Runtime Error | 0 | 0 | 499 | while True:
#審判の数
n = int(input())
if n == 0:
break
while n >= 3 and n <= 100: #審判の数は3〜100人
a = [0]*n #空いてる配列
for i in range(n): #空いてる配列に点数を入れる
s = int(input())
a[i] = s
tensu = (sum(a) - min(a) -max(a))/(len(a)-2) #一番でかい点数と一番小さ... | Traceback (most recent call last):
File "/tmp/tmp25euda7k/tmpr464l31g.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s798557269 | p00728 | u966364923 | 1419211759 | Python | Python3 | py | Runtime Error | 0 | 0 | 175 | while True:
n = int(input())
if n == 0:
exit()
score = []
for i in range(n):
score.append(int(input()))
print((sorted(score)[1:-1])//(n-2)) | Traceback (most recent call last):
File "/tmp/tmp56_a4t0l/tmp5lsa3ice.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s764615521 | p00728 | u124909914 | 1423116236 | Python | Python | py | Runtime Error | 0 | 0 | 306 | #!/usr/bin/python3
from math import floor
while True:
n = eval(input())
if n != 0:
ls = []
for i in range(n):
m = eval(input())
ls.append(m)
ls.remove(max(ls))
ls.remove(min(ls))
print(floor(sum(ls)/len(ls)))
else:
break | Traceback (most recent call last):
File "/tmp/tmplx79i5xc/tmpxgvm54ri.py", line 6, in <module>
n = eval(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s809153147 | p00728 | u124909914 | 1424151886 | Python | Python | py | Runtime Error | 0 | 0 | 306 | #!/usr/bin/python3
from math import floor
while True:
n = eval(input())
if n != 0:
ls = []
for i in range(n):
m = eval(input())
ls.append(m)
ls.remove(max(ls))
ls.remove(min(ls))
print(floor(sum(ls)/len(ls)))
else:
break | Traceback (most recent call last):
File "/tmp/tmpou2vp9r5/tmpd95h_xzf.py", line 6, in <module>
n = eval(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s522543596 | p00728 | u531061483 | 1432717907 | Python | Python | py | Runtime Error | 0 | 0 | 341 | # -*- coding:utf-8 -*-
#ICPC得点集計ソフトウェア
import sys
def solve(n):
nums = []
for i in xrange(n):
temp = input()
nums.append(temp)
nums.sort()
sum = 0
for i in xrange(1,n-1):
sum += nums[i]
return sum / (n-2)
if __name__ == "__main__":
while :
N = input()
if N == 0:
sys.exit()
else:
print solve(N... | File "/tmp/tmp7kc8bakz/tmp9leo4kra.py", line 17
while :
^
SyntaxError: invalid syntax
| |
s621319548 | p00728 | u110278902 | 1445843198 | Python | Python | py | Runtime Error | 0 | 0 | 1039 | import sys
import math
def load_file(file_name):
f = open(file_name)
lines = f.readlines()
f.close()
return lines
def change_type(lines):
new_line = []
for line in lines:
new_line.append(int(line))
return new_line
def make_group(lines):
group = []
number = lines[0]
l... | File "/tmp/tmpvusj92ry/tmph53gwbf6.py", line 48
print get_average(group)
^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s285787318 | p00728 | u110278902 | 1445869974 | Python | Python3 | py | Runtime Error | 0 | 0 | 308 | # -*- coding: utf-8 -*-
import math
def main(n):
scores = []
for i in range(n):
scores.append(int(raw_input))
scores.remove(max(scores))
scores.remove(min(scores))
print math.floor(sum(scores)/len(scores))
while 1:
n = int(raw_input)
if n == 0:
break
main(n) | File "/tmp/tmpqtxxd3js/tmp0_m1zgkz.py", line 10
print math.floor(sum(scores)/len(scores))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s963640734 | p00728 | u110278902 | 1445869984 | Python | Python | py | Runtime Error | 0 | 0 | 308 | # -*- coding: utf-8 -*-
import math
def main(n):
scores = []
for i in range(n):
scores.append(int(raw_input))
scores.remove(max(scores))
scores.remove(min(scores))
print math.floor(sum(scores)/len(scores))
while 1:
n = int(raw_input)
if n == 0:
break
main(n) | File "/tmp/tmpbnrfubhp/tmpealhgxd2.py", line 10
print math.floor(sum(scores)/len(scores))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s967919736 | p00728 | u146816547 | 1471335782 | Python | Python | py | Runtime Error | 0 | 0 | 172 | while True:
n = int(raw_input())
if n == 0:
break
l = []
for i in range(n):
l.append(int(raw_input())
print (sum(l) - max(l) - min(l)) / (len(l) - 2) | File "/tmp/tmplt53_53i/tmpd_50rjp4.py", line 11
l.append(int(raw_input())
^
SyntaxError: '(' was never closed
| |
s794636085 | p00728 | u166860661 | 1480775198 | Python | Python | py | Runtime Error | 0 | 0 | 469 | #coding: utf-8
import sys
import math
l = []
for line in sys.stdin:
l.append(int(line))
check = 0
point_list = []
for i in range(len(l)):
if check == 0:
last_row = i + l[n]
check = 1
continue
else:
point_list.append(i)
if i == last_row:
point_list.sort(... | File "/tmp/tmp2c5q733r/tmpf3c4j71w.py", line 23
print math.floor(ave)
^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s526705253 | p00728 | u166860661 | 1480775241 | Python | Python | py | Runtime Error | 0 | 0 | 469 | #coding: utf-8
import sys
import math
l = []
for line in sys.stdin:
l.append(int(line))
check = 0
point_list = []
for i in range(len(l)):
if check == 0:
last_row = i + l[i]
check = 1
continue
else:
point_list.append(i)
if i == last_row:
point_list.sort(... | File "/tmp/tmpzakag_jv/tmpzn_8rf0x.py", line 23
print math.floor(ave)
^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s059467529 | p00728 | u166860661 | 1480775589 | Python | Python | py | Runtime Error | 0 | 0 | 463 | #coding: utf-8
import sys
import math
l = []
for line in sys.stdin:
l.append(int(line))
check = 0
point_list = []
for i in range(len(l)):
if check == 0:
last_row = i + l[i]
check = 1
else:
point_list.append(i)
if i == last_row:
point_list.sort()
poi... | File "/tmp/tmp1s26ukp9/tmpiix5uoxa.py", line 22
print int(math.floor(ave))
^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s006766954 | p00728 | u166860661 | 1480775846 | Python | Python | py | Runtime Error | 0 | 0 | 465 | #coding: utf-8
import sys
import math
l = []
for line in sys.stdin:
l.append(int(line))
check = 0
point_list = []
for i in range(len(l)-1):
if check == 0:
last_row = i + l[i]
check = 1
else:
point_list.append(i)
if i == last_row:
point_list.sort()
p... | File "/tmp/tmp38e2l1h0/tmppqfv0k01.py", line 22
print int(math.floor(ave))
^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s658259798 | p00728 | u501510481 | 1500005692 | Python | Python | py | Runtime Error | 0 | 0 | 26 | str=readlines()
print(str) | Traceback (most recent call last):
File "/tmp/tmp4uj7ywej/tmp7x4s4ivs.py", line 1, in <module>
str=readlines()
^^^^^^^^^
NameError: name 'readlines' is not defined
| |
s535565034 | p00728 | u501510481 | 1500005775 | Python | Python | py | Runtime Error | 0 | 0 | 39 | str=readlines()
print(str)
print("aaa") | Traceback (most recent call last):
File "/tmp/tmpkuhrgj6m/tmpt1g2jzwt.py", line 1, in <module>
str=readlines()
^^^^^^^^^
NameError: name 'readlines' is not defined
| |
s049866921 | p00728 | u501510481 | 1500005873 | Python | Python | py | Runtime Error | 0 | 0 | 34 | str=read()
print(str)
print("aaa") | Traceback (most recent call last):
File "/tmp/tmpnz1d85uj/tmpkve20ssm.py", line 1, in <module>
str=read()
^^^^
NameError: name 'read' is not defined
| |
s348884923 | p00728 | u166871988 | 1502700399 | Python | Python3 | py | Runtime Error | 0 | 0 | 229 | while True:
n=int(input())
points=[]
for i in range(n):
points.append(int(input()))
points.remove(max(points))
points.remove(min(points))
print(sum(points)/len(points))
if int(input())==0:break | Traceback (most recent call last):
File "/tmp/tmpd4nvwtny/tmp__zd_3sj.py", line 2, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s975650445 | p00728 | u166871988 | 1502700570 | Python | Python3 | py | Runtime Error | 0 | 0 | 234 | while True:
n=int(input())
points=[]
for i in range(n):
points.append(int(input()))
points.remove(max(points))
points.remove(min(points))
print(int(sum(points)/len(points)))
if int(input())==0:break | Traceback (most recent call last):
File "/tmp/tmpd8rq90pn/tmp812vmpr9.py", line 2, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s798125115 | p00728 | u146816547 | 1523084859 | Python | Python | py | Runtime Error | 0 | 0 | 158 | while True:
n = int(raw_input())
if !n:
break
L = [int(raw_input()) for _ in range(n)]
print (sum(L) - max(L) - min(L)) / (n - 2)
| File "/tmp/tmp3nf3cnm4/tmpdexr20zw.py", line 4
if !n:
^
SyntaxError: invalid syntax
| |
s540217851 | p00728 | u878596989 | 1523845791 | Python | Python3 | py | Runtime Error | 0 | 0 | 183 | while True:
N = int(input())
if 3
N == 0:
break
S = []
for i in range(N):
S.append(int(input()))
print((sum(S) - max(S) - min(S))//(len(S)-2))
| File "/tmp/tmphn8tfj8v/tmp00ee_lmd.py", line 3
if 3
^
SyntaxError: expected ':'
| |
s121351641 | p00728 | u925259339 | 1526552585 | Python | Python3 | py | Runtime Error | 0 | 0 | 327 | import math
def main():
f = true
r = []
while f:
n = int(input())
if n == 0:
break
m = []
for i in range(n):
m.append(int(input()))
r.append(math.floor((sum(m) - max(m) - min(m)/(n-2)))
res = ''
for j in r:
res += str(j)
pr... | File "/tmp/tmpt5k94124/tmpl9blp_3o.py", line 13
r.append(math.floor((sum(m) - max(m) - min(m)/(n-2)))
^
SyntaxError: '(' was never closed
| |
s565583700 | p00728 | u925259339 | 1526552712 | Python | Python3 | py | Runtime Error | 0 | 0 | 340 | import math
def main():
f = true
r = []
while f:
n = int(input())
if n == 0:
break
m = []
for i in range(n):
m.append(int(input()))
r.append(math.floor((sum(m) - max(m) - min(m)/(n-2))))
res = ''
for j in r:
res += str(j)
p... | Traceback (most recent call last):
File "/tmp/tmpxebkm_yp/tmpo8y8addd.py", line 19, in <module>
main()
File "/tmp/tmpxebkm_yp/tmpo8y8addd.py", line 4, in main
f = true
^^^^
NameError: name 'true' is not defined. Did you mean: 'True'?
| |
s760344975 | p00728 | u703446356 | 1400595802 | Python | Python | py | Runtime Error | 0 | 0 | 241 | while(True):
n = input()
if n == 0:
break;
sl = 1001
sh = 0
ret = 0
for i in range(n):
tmp = input()
sum += tmp
if tmp < sl:
sl = tmp
if tmp > sh:
sh = tmp
ret -= (sl + sh)
print "%d" % (ret/n) | File "/tmp/tmp6fwfqthz/tmpgb_c2958.py", line 16
print "%d" % (ret/n)
^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s492839760 | p00729 | u120360464 | 1424167843 | Python | Python | py | Runtime Error | 0 | 0 | 914 | #! /usr/bin/python
# -*- coding: utf-8 -*-
from bisect import *
while 1:
(N, M) = map(int, raw_input().split())
if N == 0: break
r = int(raw_input())
used = [0]*(N+1)
imos = [[0]*1301 for i in range(1001)]
for i in range(r):
(t, n, m, s) = map(int, raw_input().split())
if s == ... | File "/tmp/tmpj2_hq_73/tmpu8i0o43f.py", line 34
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s397270658 | p00729 | u120360464 | 1424168993 | Python | Python | py | Runtime Error | 0 | 0 | 1047 | #! /usr/bin/python
# -*- coding: utf-8 -*-
from bisect import *
while 1:
(N, M) = map(int, raw_input().split())
if N == 0: break
r = int(raw_input())
used = [0]*(N+1)
imos = [[0]*1301 for i in range(M+1)]
for i in range(r):
(t, n, m, s) = map(int, raw_input().split())
if s == 1... | File "/tmp/tmpg8jyv7za/tmptnb42r48.py", line 39
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s303919739 | p00730 | u328199937 | 1555834296 | Python | Python3 | py | Runtime Error | 0 | 0 | 1254 | ans_list = []
def make_pieces(w, d, s):
s %= (2 * w + 2 * d)
while True:
if w > s:
return [s, d], [w - s, d]
s -= w
if d > s:
return [w, s], [w, d - s]
s -= d
if w > s:
return [w - s, d], [s, d]
s -= w
if d > s:
... | Traceback (most recent call last):
File "/tmp/tmprcbw2hk2/tmpmks765_x.py", line 20, in <module>
n, w, d = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s489118814 | p00730 | u802625365 | 1474775048 | Python | Python3 | py | Runtime Error | 0 | 0 | 774 | def cut(cake,s):
ret_cake = [(0,0),(0,0)]
w = cake[2]
h = cake[1]
s %= 2*(w+h)
if w > s:
ret_cake = [(h,s),(h,w-s)]
elif w+h > s:
ret_cake = [(s-w,w),(w+h-s,w)]
elif 2*w+h > s:
ret_cake = [(s-w-h,w),(2*w+h-s,w)]
elif 2*w+2*h > s:
ret_cake = [(s-2*w-h,w),(2... | Traceback (most recent call last):
File "/tmp/tmpsl3jz4c2/tmpcnc0a9h2.py", line 18, in <module>
n,w,d = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s157074756 | p00730 | u408260374 | 1493918652 | Python | Python3 | py | Runtime Error | 0 | 0 | 783 | def cut(d, w, s):
s %= 2 * (d + w)
sq = []
if 0 < s < w:
sq = [(d, s), (d, w - s)]
elif w < s < w + d:
s -= w
sq = [(s, w), (d - s, w)]
elif w + d < s < 2 * w + d:
s -= w + d
sq = [(d, s), (d, w - s)]
elif 2 * w + d < s < 2 * (w + d):
s -= 2 * w + ... | Traceback (most recent call last):
File "/tmp/tmpcl99__r8/tmp6ejmlaa1.py", line 24, in <module>
N, W, D = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s501569513 | p00730 | u408260374 | 1493919445 | Python | Python3 | py | Runtime Error | 0 | 0 | 758 | def cut(d, w, s):
s %= 2 * (d + w)
sq = []
if 0 < s < w:
sq = [(d, s), (d, w - s)]
elif w < s < w + d:
s -= w
sq = [(s, w), (d - s, w)]
elif w + d < s < 2 * w + d:
s -= w + d
sq = [(d, s), (d, w - s)]
elif 2 * w + d < s < 2 * (w + d):
s -= 2 * w + ... | Traceback (most recent call last):
File "/tmp/tmpfd9frc58/tmpdg4s2c8a.py", line 24, in <module>
N, W, D = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s635854921 | p00730 | u509278866 | 1529633014 | Python | Python3 | py | Runtime Error | 0 | 0 | 1269 | 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/tmp0bxsu7ck/tmpivr_oogw.py", line 45, in <module>
print(main())
^^^^^^
File "/tmp/tmp0bxsu7ck/tmpivr_oogw.py", line 24, in main
n,w,d = LI()
^^^^^
ValueError: not enough values to unpack (expected 3, got 0)
| |
s601198926 | p00730 | u855199458 | 1529744548 | Python | Python3 | py | Runtime Error | 0 | 0 | 2144 | # -*- coding: utf-8 -*-
import sys
sys.path.append("C:\\Users\\nadare\\python_programs\\competitive_programming\\library")
import lib
import inspect
import pyperclip
from tqdm import tqdm
def snippet(module):
text = inspect.getsource(module)
pyperclip.copy(text)
print(text)
def get_input(inp):
... | Traceback (most recent call last):
File "/tmp/tmppb8bbggr/tmp8i9mtze4.py", line 5, in <module>
import lib
ModuleNotFoundError: No module named 'lib'
| |
s036071924 | p00734 | u164311692 | 1558925070 | Python | Python3 | py | Runtime Error | 0 | 0 | 476 | def answer(n, m, taro, hanako):
for t in sorted(taro):
fot h in (hanako):
if sum(taro) - t + h == sum(hanako) - h + t:
return f'{t} {h}'
return -1
while True:
n, m = map(int, input().split())
if n == 0 and m == 0:
break
taro = []
hanako = []
... | File "/tmp/tmpl09cnik3/tmpe0uxas62.py", line 3
fot h in (hanako):
^
SyntaxError: invalid syntax
| |
s550459149 | p00734 | u164311692 | 1558925534 | Python | Python3 | py | Runtime Error | 0 | 0 | 453 | def answer(n, m, taro, hanako):
for t in sorted(taro):
for h in sorted(hanako):
if sum(taro) - y + h == sum(hanako) - h + t:
return '{t} {h}'
while True:
n, m = map(int, input().split())
if n == 0 and m == 0:
break
taro = []
hanako = []
for I in range... | File "/tmp/tmpc8jlnbst/tmpms7_kihs.py", line 13
for I in range(n)
^
SyntaxError: expected ':'
| |
s212514636 | p00734 | u164311692 | 1558925580 | Python | Python3 | py | Runtime Error | 0 | 0 | 453 | def answer(n, m, taro, hanako):
for t in sorted(taro):
for h in sorted(hanako):
if sum(taro) - t + h == sum(hanako) - h + t:
return '{t} {h}'
while True:
n, m = map(int, input().split())
if n == 0 and m == 0:
break
taro = []
hanako = []
for I in range... | File "/tmp/tmpm85rfg5j/tmpfshhxek5.py", line 13
for I in range(n)
^
SyntaxError: expected ':'
| |
s156421274 | p00734 | u164311692 | 1558925602 | Python | Python3 | py | Runtime Error | 0 | 0 | 467 | def answer(n, m, taro, hanako):
for t in sorted(taro):
for h in sorted(hanako):
if sum(taro) - t + h == sum(hanako) - h + t:
return '{t} {h}'
return -1
while True:
n, m = map(int, input().split())
if n == 0 and m == 0:
break
taro = []
hanako = []
... | File "/tmp/tmpeaz1vz_3/tmpvkudyh6x.py", line 14
for I in range(n)
^
SyntaxError: expected ':'
| |
s079722429 | p00734 | u164311692 | 1558925646 | Python | Python3 | py | Runtime Error | 0 | 0 | 467 | def answer(n, m, taro, hanako):
for t in sorted(taro):
for h in sorted(hanako):
if sum(taro) - t + h == sum(hanako) - h + t:
return '{t} {h}'
return -1
while True:
n, m = map(int, input().split())
if n == 0 and m == 0:
break
taro = []
hanako = []
... | File "/tmp/tmpxi69ar_2/tmpooov9db_.py", line 14
for i in range(n)
^
SyntaxError: expected ':'
| |
s548353912 | p00734 | u164311692 | 1558925728 | Python | Python3 | py | Runtime Error | 0 | 0 | 468 | def answer(n, m, taro, hanako):
for t in sorted(taro):
for h in sorted(hanako):
if sum(taro) - t + h == sum(hanako) - h + t:
return '{t} {h}'
return -1
while True:
n, m = map(int, input().split())
if n == 0 and m == 0:
break
taro = []
hanako = []
... | File "/tmp/tmpdemf0hp3/tmphugvv2gc.py", line 14
for i in range(n)
^
SyntaxError: expected ':'
| |
s822711414 | p00734 | u128811851 | 1434524910 | Python | Python3 | py | Runtime Error | 0 | 0 | 1463 | def impossible(taro_cards, hanako_cards, average):
if (sum(taro_cards) + sum(hanako_cards)) % 2 == 1:
return True
elif sum(taro_cards) + max(taro_cards) - min(hanako_cards) < average:
return True
elif sum(hanako_cards) + max(hanako_cards) - min(taro_cards) < average:
return True
... | Traceback (most recent call last):
File "/tmp/tmpcx8iw0d0/tmpb9zoam0p.py", line 13, in <module>
n_taro, n_hanako = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s741772281 | p00734 | u128811851 | 1434524943 | Python | Python3 | py | Runtime Error | 0 | 0 | 1463 | def impossible(taro_cards, hanako_cards, average):
if (sum(taro_cards) + sum(hanako_cards)) % 2 == 1:
return True
elif sum(taro_cards) + max(taro_cards) - min(hanako_cards) < average:
return True
elif sum(hanako_cards) + max(hanako_cards) - min(taro_cards) < average:
return True
... | Traceback (most recent call last):
File "/tmp/tmpinatg813/tmp5h1i2kbd.py", line 13, in <module>
n_taro, n_hanako = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s035592574 | p00734 | u128811851 | 1434525526 | Python | Python3 | py | Runtime Error | 0 | 0 | 1496 | def impossible(taro_cards, hanako_cards, average):
if (sum(taro_cards) + sum(hanako_cards)) % 2 == 1:
return True
elif sum(taro_cards) + max(taro_cards) - min(hanako_cards) < average:
return True
elif sum(hanako_cards) + max(hanako_cards) - min(taro_cards) < average:
return True
... | File "/tmp/tmpgla8re2b/tmp68_1m6o_.py", line 32
for i in range(len(taro_cards)):
^
IndentationError: expected an indented block after 'else' statement on line 30
| |
s724396147 | p00734 | u672443148 | 1514710334 | Python | Python3 | py | Runtime Error | 0 | 0 | 750 | import numpy as np
while True:
N,M=map(int,input().split())
if N==0 and M==0:
break
allCards=[]
for i in range(N+M):
allCards.append(int(input()))
Taro=np.array(allCards[:N])
Hanako=np.array(allCards[N:])
Tsum=np.sum(Taro)
Hsum=np.sum(Hanako)
... | Traceback (most recent call last):
File "/tmp/tmpj14m13ds/tmpznss5b0m.py", line 3, in <module>
N,M=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s615115712 | p00734 | u273843182 | 1514740289 | Python | Python3 | py | Runtime Error | 0 | 0 | 864 | #include<iostream>
#include<vector>
using namespace std;
int main(){
while(1){
int n,m,x,sum1=0,sum2=0,ans=100000,num,ax=0,ay=0;
vector<int> N,M;
cin >> n >> m;
if(n==0&&m==0) break;
for(int i=n;i--;){
cin >> x;
sum1+=x;
N.push_back(x);
... | File "/tmp/tmp5f6x4h9v/tmp3e76be0g.py", line 3
using namespace std;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s403816207 | p00735 | u591052358 | 1528977118 | Python | Python | py | Runtime Error | 0 | 0 | 374 | N = 300000
a = [((i % 7 ==1)or(i % 7 ==6)) for i in range(N)]
#print(a[11])
a[1]=0
p =[]
for i in range(6,N):
if a[i]:
p+=[i]
for j in range(i * i ,N,i):
a[j] = 0
while True:
n = int(input())
if n == 1:
break
print(n,end = ":")
for x in p:
if n % x ==0:
... | Traceback (most recent call last):
File "/tmp/tmp1x8j5mqu/tmpk_cy7pp8.py", line 13, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s138699852 | p00736 | u467175809 | 1529351236 | Python | Python | py | Runtime Error | 0 | 0 | 990 | #!/usr/bin/env python
from collections import deque
import itertools as it
import sys
sys.setrecursionlimit(1000000)
while True:
S_ = raw_input()
if S_ == '.':
break
ans = 0
for p, q, r in it.product([0, 1, 2], repeat = 3):
S = S_
S = S.replace("P", p).replace("Q", q).replace... | File "/tmp/tmp1idmjkr7/tmp559u_6ek.py", line 36
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s520979599 | p00737 | u998232877 | 1434805397 | Python | Python | py | Runtime Error | 19930 | 28748 | 2209 | # -*- coding: utf-8 -*-
import heapq
class Tuple:
def __init__(self, cost, y, x, dir):
self.cost = cost
self.y = y
self.x = x
self.dir = dir
def __str__(self):
return "y=" + str(self.y) + " : " + "x=" + str(self.x) + " : " + "dir=" + str(self.dir) + ": cost=" + str(
... | File "/tmp/tmptk5a2i42/tmpcyg7sank.py", line 77
print result
^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s144519233 | p00737 | u998232877 | 1434809685 | Python | Python | py | Runtime Error | 19930 | 9028 | 2252 | # -*- coding: utf-8 -*-
import heapq
class Tuple:
def __init__(self, cost, y, x, dir):
self.cost = cost
self.y = y
self.x = x
self.dir = dir
def __str__(self):
return "y=" + str(self.y) + " : " + "x=" + str(self.x) + " : " + "dir=" + str(self.dir)
dir_x = [1, 0, -1,... | File "/tmp/tmpj4ppro57/tmpz_8m87is.py", line 81
print result
^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s804616765 | p00740 | u128811851 | 1434411494 | Python | Python3 | py | Runtime Error | 0 | 0 | 999 | #!/usr/bin/python
# -*- coding: utf-8 -*-
def is_winner(turn):
if having_amount.count(0) == len(having_amount) - 1:
return True
else:
return False
# having_amount[i] represents the amount of pebbles the
# candidate numbered i is having
winner_number = []
# initialize
turn = 0
while True:
... | Traceback (most recent call last):
File "/tmp/tmptdwrpv_8/tmpcwt2tlg8.py", line 21, in <module>
mayors, pebbles_in_bowl = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s372054174 | p00740 | u347385753 | 1498644010 | Python | Python3 | py | Runtime Error | 0 | 0 | 305 | while 1:
n,p = map(int,input().split())
if n==0:break
man = [0]*n
ball,a = p,0
while 1:
if ball >0:ball,man[a%n] =ball-1, man[a%n]+1
elif ball == 0:ball,man[a%n] = man[a%n],ball
a+=1
if p in man:break
print(man.index(max(man))) ) | File "/tmp/tmpkcgicgnd/tmp_6s_jilw.py", line 11
print(man.index(max(man))) )
^
SyntaxError: unmatched ')'
| |
s715184784 | p00740 | u651355315 | 1529311854 | Python | Python3 | py | Runtime Error | 0 | 0 | 597 | import numpy as np
while True:
try:
l = list(map(int, input().split()))
S = l[0]
p = np.zeros(S)
M = l[1]
i = 0
N = M
while True:
if N == M and i != 0:
ans = i % S - 1
if ans < 0:
ans = S + ans
... | ||
s198194947 | p00740 | u651355315 | 1529311901 | Python | Python3 | py | Runtime Error | 0 | 0 | 597 | import numpy as np
while True:
try:
l = list(map(int, input().split()))
S = l[0]
p = np.zeros(S)
M = l[1]
i = 0
N = M
while True:
if N == M and i != 0:
ans = i % S - 1
if ans < 0:
ans = S + ans
... | ||
s512086680 | p00740 | u651355315 | 1529312123 | Python | Python3 | py | Runtime Error | 0 | 0 | 597 | import numpy as np
while True:
try:
l = list(map(int, input().split()))
S = l[0]
p = np.zeros(S)
M = l[1]
i = 0
N = M
while True:
if N == M and i != 0:
ans = i % S - 1
if ans < 0:
ans = S + ans
... | ||
s672358895 | p00740 | u651355315 | 1529312272 | Python | Python3 | py | Runtime Error | 0 | 0 | 596 | import numpy as np
while True:
try:
l = list(map(int, input().split()))
S = l[0]
p = np.zeros(S)
M = l[1]
i = 0
N = M
while True:
if N == M and i != 0:
ans = i % S - 1
if ans < 0:
ans = S + ans
... | ||
s478997896 | p00740 | u651355315 | 1529312543 | Python | Python3 | py | Runtime Error | 0 | 0 | 526 | import numpy as np
while True:
try:
l = list(map(int, input().split()))
S = l[0]
p = np.zeros(S)
M = l[1]
i = 0
N = M
while True:
if p[i] == M:
print(i)
break
if N == 0:
N = p[i]
... | ||
s562488051 | p00740 | u651355315 | 1529312656 | Python | Python3 | py | Runtime Error | 0 | 0 | 582 | import numpy as np
while True:
try:
l = list(map(int, input().split()))
S = l[0]
p = np.zeros(S)
M = l[1]
i = 0
N = M
if M == 0 and S == 0:
break
while True:
if p[i] == M:
print(i)
break... | ||
s216436674 | p00740 | u651355315 | 1529312729 | Python | Python3 | py | Runtime Error | 0 | 0 | 582 | import numpy as np
while True:
try:
l = list(map(int, input().split()))
S = l[0]
p = np.zeros(S)
M = l[1]
i = 0
N = M
if M == 0 and S == 0:
break
while True:
if p[i] == M:
print(i)
break... | ||
s225445630 | p00740 | u651355315 | 1529313225 | Python | Python3 | py | Runtime Error | 0 | 0 | 450 | import numpy as np
while True:
l = list(map(int, input().split()))
S = l[0]
p = np.zeros(S)
M = l[1]
i = 0
N = M
if M == 0 and S == 0:
break
while True:
if p[i] == M:
print(i)
break
if N == 0:
N = p[i]
p[i] = 0
... | Traceback (most recent call last):
File "/tmp/tmp1xd9r1qa/tmpiv515vjs.py", line 4, in <module>
l = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s732822205 | p00741 | u799595944 | 1551266507 | Python | Python3 | py | Runtime Error | 0 | 0 | 1415 | import queue
def proceess(start_x,start_y):
#insland = []
#insland.append([start_x,start_y])
new_island = queue.Queue()
map[start_x][start_y] = 0
new_island.put([start_x,start_y])
while True:
ob = new_island.get()
x = ob[0]
y = ob[1]
print("x : " + str(x) + ", y ... | Traceback (most recent call last):
File "/tmp/tmpp_055rar/tmphblebdap.py", line 34, in <module>
tmp = input().split(" ")
^^^^^^^
EOFError: EOF when reading a line
| |
s872818284 | p00741 | u799595944 | 1551266633 | Python | Python3 | py | Runtime Error | 0 | 0 | 1420 | import queue
def proceess(start_x,start_y):
#insland = []
#insland.append([start_x,start_y])
new_island = queue.Queue()
map[start_x][start_y] = 0
new_island.put([start_x,start_y])
while True:
ob = new_island.get()
x = ob[0]
y = ob[1]
#print("x : " + str(x) + ", y... | Traceback (most recent call last):
File "/tmp/tmp1mnoisw1/tmp811vqkli.py", line 34, in <module>
tmp = input().split(" ")
^^^^^^^
EOFError: EOF when reading a line
| |
s278981855 | p00741 | u328199937 | 1555844377 | Python | Python | py | Runtime Error | 0 | 0 | 2246 | anslist = []
def sarch(i, j, visited):
if 0 < i:
if visited[i - 1][j] == 0:
visited[i - 1][j] = 1
sarch(i - 1, j, visited)
if 0 < j:
if visited[i - 1][j - 1] == 0:
visited[i - 1][j - 1] = 1
sarch(i - 1, j - 1, visited)
if j... | Traceback (most recent call last):
File "/tmp/tmpccna3hsa/tmpgpq4gmws.py", line 42, in <module>
w, h = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s449373454 | p00741 | u328199937 | 1555844410 | Python | Python3 | py | Runtime Error | 0 | 0 | 2246 | anslist = []
def sarch(i, j, visited):
if 0 < i:
if visited[i - 1][j] == 0:
visited[i - 1][j] = 1
sarch(i - 1, j, visited)
if 0 < j:
if visited[i - 1][j - 1] == 0:
visited[i - 1][j - 1] = 1
sarch(i - 1, j - 1, visited)
if j... | Traceback (most recent call last):
File "/tmp/tmpsa1u6dkb/tmpma09pheq.py", line 42, in <module>
w, h = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.