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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s111525273 | p00042 | u019169314 | 1527996936 | Python | Python3 | py | Runtime Error | 0 | 0 | 1116 | case = 0
while True:
W = int(input())
if W == 0:
break
N = int(input())
case += 1
# a list of [itemValue, itemWeight]
items = [list(map(int,input().split(','))) for i in range(N)]
dp = {}
def bestVW(item, capa):
if (item,capa) in dp:
return dp[(item,capa)]
... | Traceback (most recent call last):
File "/tmp/tmpzhzwh15o/tmpyvxtgh8n.py", line 3, in <module>
W = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s497587343 | p00042 | u019169314 | 1527997057 | Python | Python3 | py | Runtime Error | 20 | 5616 | 1120 | case = 0
while True:
W = int(input())
if W == 0:
break
N = int(input())
case += 1
# a list of [itemValue, itemWeight]
items = [list(map(int,input().split(','))) for i in range(N)]
dp = {}
def bestVW(item, capa):
if (item,capa) in dp:
return dp[(item,capa)]
... | Traceback (most recent call last):
File "/tmp/tmpf1tv_wa3/tmp47p3ju3q.py", line 3, in <module>
W = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s909005656 | p00042 | u647766105 | 1356490433 | Python | Python | py | Runtime Error | 10 | 4284 | 422 | case=0
while True:
case+=1
W=input()
if W==0:break
print "Case {}:".format(case)
dp=[0]*1000
w=[0]*1000
v=[0]*1000
n=input()
for i in xrange(n):
v[i],w[i]=map(int,raw_input().strip().split(","))
for i in xrange(n):
for j in xrange(W,-1,-1):
if j+w[i]<=... | File "/tmp/tmp1_z03sep/tmpym0txd6u.py", line 6
print "Case {}:".format(case)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s466099884 | p00042 | u104911888 | 1365033286 | Python | Python | py | Runtime Error | 0 | 0 | 525 | num=1
maxw=input()
while maxw<>0:
N=input()
ws,ps=[],[]
for i in range(N):
tmp=input()
ws.append(tmp[1])
ps.append(tmp[0])
dp=[[0]*(maxw+1) for i in range(len(ws)+1)]
ret=0
for i in range(len(ws)):
for j in range(maxw+1):
if (j+ws[i])<=maxw:
... | File "/tmp/tmpnwv405qw/tmp8u9wh0rn.py", line 3
while maxw<>0:
^^
SyntaxError: invalid syntax
| |
s725835884 | p00042 | u104911888 | 1365034666 | Python | Python | py | Runtime Error | 0 | 0 | 525 | num=1
while True:
maxw=input()
if maxw==0:break
N=input()
ws,ps=[0]*N,[0]*N
for i in xrange(N):
ps[i],ws[i]=map(int,raw_input().strip().split(","))
dp=[[0]*(maxw+1) for i in range(len(ws)+1)]
ret=0
for i in range(len(ws)):
for j in range(maxw+1):
if (j+ws[i])<... | File "/tmp/tmp9bf3na1_/tmpfgikoaxr.py", line 16
print "Case %d:"%num
^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s339135834 | p00042 | u104911888 | 1365034733 | Python | Python | py | Runtime Error | 0 | 0 | 533 | num=1
while True:
maxw=input()
if maxw==0:break
N=input()
ws,ps=[0]*N,[0]*N
for i in xrange(N):
ps[i],ws[i]=map(int,raw_input().strip().split(","))
dp=[[0]*(maxw+1) for i in range(len(ws)+1)]
ret=0
for i in range(len(ws)):
for j in range(maxw+1):
if (j+ws[i])<... | File "/tmp/tmpfypapqus/tmpddz8zugb.py", line 16
print "Case {}:".format(num)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s657829285 | p00042 | u104911888 | 1365034850 | Python | Python | py | Runtime Error | 0 | 0 | 513 | num=1
while True:
maxw=input()
if maxw==0:break
N=input()
ws,ps=[0]*N,[0]*N
for i in range(N):
ps[i],ws[i]=map(int,raw_input().strip().split(","))
#dp=[[0]*(maxw+1) for i in range(N+1)]
ret=0
for i in range(N):
for j in range(maxw+1):
if (j+ws[i])<=maxw:
... | File "/tmp/tmp2fh4a94v/tmpnaqe9lzl.py", line 16
print "Case %d:"%num
^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s401954916 | p00042 | u542421762 | 1369487284 | Python | Python | py | Runtime Error | 0 | 0 | 1433 |
import sys
import itertools
class Treasure:
def __init__(self, value, weight):
self.value = value
self.weight = weight
def solv(treasures, w_limit):
comb = t_combinations(treasures)
ts = filter(lambda x: t_sum_weight(x) <= w_limit, comb)
max_value = max(map(lambda x: t_sum_value(x), ... | File "/tmp/tmp2dfe04vp/tmpe5rllruu.py", line 64
print 'Case ' + str(case) + ':'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s728223965 | p00042 | u542421762 | 1369487540 | Python | Python | py | Runtime Error | 0 | 0 | 1441 |
import sys
import itertools
class Treasure:
def __init__(self, value, weight):
self.value = value
self.weight = weight
def solv(treasures, w_limit):
comb = t_combinations(treasures)
ts = filter(lambda x: t_sum_weight(x) <= w_limit, comb)
max_value = max(map(lambda x: t_sum_value(x)... | File "/tmp/tmp4pivkv3k/tmphclk0y0r.py", line 66
print 'Case ' + str(case) + ':'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s830414421 | p00042 | u782850731 | 1375710950 | Python | Python | py | Runtime Error | 0 | 0 | 810 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (division, absolute_import, print_function,
unicode_literals)
from sys import stdin
from itertools import count, combinations
for case in count(1):
W = int(stdin.readline())
if not W:
break
N = int(stdin.r... | File "/tmp/tmpex3o4t3c/tmpy55f2n9u.py", line 28
tv, tw = max(total, key=lambda(tv, tw): (tv, -tw))
^^^^^^^^
SyntaxError: Lambda expression parameters cannot be parenthesized
| |
s799922147 | p00042 | u633068244 | 1394280102 | Python | Python | py | Runtime Error | 0 | 0 | 371 | r = 50001
sqrt = int(math.sqrt(r))
p = [1]*r
p[0] = 0
for i in range(1,sqrt):
if p[i]:
p[2*i+1::i+1] = [0 for x in range(2*i+1,r,i+1)]
while True:
n = int(raw_input())
if n == 0:
break
count = 0
for i in range(n/2):
if p[i] == 1:
m = n - (i+1)
if p[m-... | File "/tmp/tmp0sd8puyr/tmpvzlsioga.py", line 19
print count
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s511089478 | p00042 | u633068244 | 1396011923 | Python | Python | py | Runtime Error | 20 | 4236 | 411 | def get():
p,w = map(int, raw_input().split(","))
for i in range(W-w+1,-1,-1):
if bag[i] > 0 and bag[i]+p > bag[i+w]:
bag[i+w] = bag[i]+p
else:
if p > bag[w]: bag[w] = p
return
c = 1
while True:
W = int(raw_input())
if W == 0: break
bag = [0]*(W+1)
N = int(raw_input())
for i in range(N): get()
w_all =... | File "/tmp/tmpaxd143t7/tmpnytokf0f.py", line 19
print "Case {}:\n{}\n{}".format(c,w_all,money)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s562709946 | p00042 | u246033265 | 1396697375 | Python | Python | py | Runtime Error | 100 | 20604 | 666 | for h in range(1, 10000):
w = int(raw_input())
if w == 0:
break
n = int(raw_input())
a = [map(int, raw_input().split(',')) for i in range(n)]
d = [[None] * 1010 for i in range(1010)]
def f(ix, w):
if ix == n:
return 0, 0
if d[ix][w] is not None:
r... | File "/tmp/tmpjdkfbsk5/tmplrm3twj1.py", line 22
print 'Case {}:'.format(h)
^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s387003722 | p00042 | u246033265 | 1396800210 | Python | Python | py | Runtime Error | 0 | 0 | 655 | def mlist(n, *args, **keys):
if args:
return [mlist(*args, **keys) for i in range(n)]
else:
return [keys.get('default')] * n
while True:
w = int(raw_input())
if w == 0: break
n = int(raw_input())
a, b = zip(*[map(int, raw_input().split(',')) for i in range(5)])
c = mlist(101... | File "/tmp/tmpdod1e9pk/tmpid6xddha.py", line 21
print mx
^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s235164523 | p00042 | u072661006 | 1397791080 | Python | Python | py | Runtime Error | 0 | 0 | 1064 | #!/bin/env python3
from __future__ import division, print_function
try:
input = raw_input
range = xrange
except NameError:
pass
# 上記のコードはPython2とPython3の違いを一部吸収するためのもの
def main():
value = [0] * 1000
weight = [0] * 1000
casenum = 1
while True:
W = int(input())
if(W == 0):
... | Traceback (most recent call last):
File "/tmp/tmpi4uuretc/tmp1x2vrj0u.py", line 37, in <module>
main()
File "/tmp/tmpi4uuretc/tmp1x2vrj0u.py", line 16, in main
W = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s825420812 | p00043 | u508732591 | 1486108930 | Python | Python3 | py | Runtime Error | 0 | 0 | 692 | import scala.io.StdIn.{readLine,readInt}
object Main extends App {
val seq1 = for(i<-1 to 9) yield Vector(i,i,i)
val seq2 = for(i<-1 to 7) yield Vector(i,i+1,i+2)
def check(m:Vector[Int], count:Int,u:Int,v:Int):Boolean =
if(m.length != count) false
else if(count==2) m(0)==m(1)
else
(u to 8).ex... | File "/tmp/tmpi3r246gs/tmpzuf6z5xw.py", line 1
import scala.io.StdIn.{readLine,readInt}
^
SyntaxError: invalid syntax
| |
s832322259 | p00043 | u508732591 | 1486108983 | Python | Python3 | py | Runtime Error | 0 | 0 | 692 | import scala.io.StdIn.{readLine,readInt}
object Main extends App {
val seq1 = for(i<-1 to 9) yield Vector(i,i,i)
val seq2 = for(i<-1 to 7) yield Vector(i,i+1,i+2)
def check(m:Vector[Int], count:Int,u:Int,v:Int):Boolean =
if(m.length != count) false
else if(count==2) m(0)==m(1)
else
(u to 8).ex... | File "/tmp/tmp5_l9wb6o/tmpg49vh1dw.py", line 1
import scala.io.StdIn.{readLine,readInt}
^
SyntaxError: invalid syntax
| |
s154419502 | p00043 | u150984829 | 1518744624 | Python | Python3 | py | Runtime Error | 0 | 0 | 513 | import sys
def f(c,h=0):
if 2 in c and sum(c)==2:return 1
if 5 in c:return 0 # sum(c)==2
if 4 in c:
k=c.index(4);c[k]-=3
if f(c,h+1):return 1
c[k]+=3
if 3 in c:
k=c.index(3);c[k]-=3
if f(c,h+1):return 1
c[k]+=3
for i in range(7):
if c[i]and c[i+1]and c[i+2]:
c[i]-=1;c[i+1]-=1... | ||
s034930116 | p00043 | u150984829 | 1518744708 | Python | Python3 | py | Runtime Error | 0 | 0 | 521 | import sys
def f(c,h=0):
if 2 in c and sum(c)==2:return 1
if 5 in c:return 0 # sum(c)==2
if 4 in c:
k=c.index(4);c[k]-=3
if f(c,h+1):return 1
c[k]+=3
if 3 in c:
k=c.index(3);c[k]-=3
if f(c,h+1):return 1
c[k]+=3
for i in range(7):
if c[i]and c[i+1]and c[i+2]:
c[i]-=1;c[i+1]-=1... | ||
s244894053 | p00043 | u017525488 | 1351356695 | Python | Python | py | Runtime Error | 0 | 0 | 1209 |
def dfs(hands, pair):
hands.sort()
if not hands:
return True
target = hands[0]
# sequence
if all(map(lambda x: x in hands, range(target, target + 3))):
for i in range(target, target + 3):
hands.remove(i)
if dfs(hands, pair):
return True
for i... | File "/tmp/tmppfi09tgg/tmpaqpflpnw.py", line 43
print result
^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s029031198 | p00043 | u017525488 | 1351356737 | Python | Python | py | Runtime Error | 0 | 0 | 1207 |
def dfs(hands, pair):
hands.sort()
if not hands:
return True
target = hands[0]
# sequence
if all(map(lambda x: x in hands, range(target, target + 3))):
for i in range(target, target + 3):
hands.remove(i)
if dfs(hands, pair):
return True
for i... | File "/tmp/tmp4vdu12nv/tmpmaluju8k.py", line 43
print " ".join(result)
^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s019074781 | p00044 | u075836834 | 1458951446 | Python | Python3 | py | Runtime Error | 0 | 0 | 477 | def sieve(n):
p=[True]*(n+1)
p[0]=p[1]=False
for i in range(2,int((n+1)*0.5)+1):
if p[i]==True:
for j in range(i*i,n+1,i):
p[j]=False
prime=[]
for i in range(n+1):
if p[i]==True:
prime.append(i)
return prime
def solve(n):
i=0
a,b=0,0
while True:
if n>prime[i]:
a=prime[i]
elif n==prime[i]:... | ||
s676810956 | p00044 | u075836834 | 1458951690 | Python | Python3 | py | Runtime Error | 0 | 0 | 468 | def sieve(n):
p=[True]*(n+1)
p[0]=p[1]=False
for i in range(2,int((n+1)*0.5)+1):
if p[i]==True:
for j in range(i*i,n+1,i):
p[j]=False
prime=[]
for i in range(n+1):
if p[i]==True:
prime.append(i)
return prime
def solve(n):
i=0
while True:
if n>prime[i]:
a=prime[i]
elif n==prime[i]:
a=pri... | ||
s372965692 | p00044 | u130979865 | 1461237733 | Python | Python | py | Runtime Error | 0 | 0 | 442 | # -*- coding: utf-8 -*-
import sys
primes = [2]
for i in range(3, 50010):
flag = True
for p in primes:
if i % p == 0:
flag = False
break
if flag:
primes.append(i)
for line in sys.stdin:
n = int(line)
i = 0
while primes[i] < n and i < len(primes):
... | File "/tmp/tmptmeussww/tmpzk9fpj2_.py", line 25
print s, m
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s004023313 | p00044 | u546285759 | 1483587468 | Python | Python3 | py | Runtime Error | 0 | 0 | 373 | import sys
from itertools import takewhile, dropwhile
L, pn, tmp = 224, [], [i for i in range(2, 50000)]
while tmp[0] < 224:
v = tmp.pop(0)
pn.append(v)
tmp = list(filter(lambda x: x%v!=0, tmp))
for t in tmp: pn.append(t)
for line in sys.stdin:
n = int(line.strip())
print(list(takewhile(lambda x: ... | ||
s758617065 | p00044 | u546285759 | 1483620598 | Python | Python3 | py | Runtime Error | 0 | 0 | 376 | from itertools import takewhile, dropwhile
pn, tmp = [], [i for i in range(2, 50000)]
while tmp[0] < 224:
v = tmp.pop(0)
pn.append(v)
tmp = list(filter(lambda x: x%v!=0, tmp))
for t in tmp: pn.append(t)
while True:
try:
n = int(input())
except:
break
print(list(takewhile(lambda x... | ||
s841300489 | p00044 | u546285759 | 1483620769 | Python | Python3 | py | Runtime Error | 0 | 0 | 392 | from itertools import takewhile, dropwhile
pn, tmp = [], [i for i in range(2, 50000)]
while tmp[0] < 224:
v = tmp.pop(0)
pn.append(v)
tmp = list(filter(lambda x: x%v!=0, tmp))
for t in tmp: pn.append(t)
while True:
try:
n = int(input())
a, b = list(takewhile(lambda x: x<n, pn))[-1], list(dro... | File "/tmp/tmpopq9sl0n/tmph5s0r1ha.py", line 11
a, b = list(takewhile(lambda x: x<n, pn))[-1], list(dropwhile(lambda x: x<=n, pn))[0]
^
SyntaxError: expected 'except' or 'finally' block
| |
s098281297 | p00044 | u546285759 | 1483677461 | Python | Python3 | py | Runtime Error | 0 | 0 | 376 | from itertools import takewhile, dropwhile
pn, tmp = [], [i for i in range(2, 50000)]
while tmp[0] < 224:
v = tmp.pop(0)
pn.append(v)
tmp = list(filter(lambda x: x%v!=0, tmp))
for t in tmp: pn.append(t)
while True:
try:
n = int(input())
except:
break
print(list(takewhile(lambda x... | ||
s066972854 | p00044 | u078042885 | 1484102459 | Python | Python3 | py | Runtime Error | 0 | 0 | 271 | n=1000000
p=[1]*(n+1)
p[0],p[1]=0,0
for i in range(2,int(n**0.5)+1):
if p[i]:
for j in range(i*i,n+1,i):
p[j]=0
p=[i for i in range(n+1) if p[i]==1]
while 1:
try:n=int(input())
except:break
i=p.index(n)
print(p[i-1],p[i+1]) | ||
s318604868 | p00044 | u546285759 | 1491461360 | Python | Python3 | py | Runtime Error | 0 | 0 | 322 | primes = [0, 0] + [1]*49999
for i in range(2, 224):
if primes[i]:
for j in range(i*i, 50001, i):
primes[j] = 0
while True:
try:
n = int(input())
except:
break
m, o = n-1, n+1
while not primes[m]:
m -= 1
while not primes[o]:
o += 1
print(m, ... | ||
s304070735 | p00044 | u811733736 | 1492493987 | Python | Python3 | py | Runtime Error | 0 | 0 | 1172 | # -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0044
?´???°II
"""
import sys
def create_prime_list(limit):
""" ??¨??????????????????????????§limit?????§????´???°?????????????±???????
https://ja.wikipedia.org/wiki/%E3%82%A8%E3%83%A9%E3%83%88%E3%82%B9%E3%83%86%E3%83%8D%E3%82... | ||
s343150782 | p00044 | u462831976 | 1493082870 | Python | Python3 | py | Runtime Error | 0 | 0 | 467 | # -*- coding: utf-8 -*-
import sys
import os
import math
import itertools
def is_prime(q):
q = abs(q)
if q == 2: return True
if q < 2 or q&1 == 0: return False
return pow(2, q-1, q) == 1
for s in sys.stdin:
n = int(s)
for i in range(n-1, 3, -1):
if is_prime(i):
answer0 = ... | ||
s742950324 | p00044 | u462831976 | 1493082976 | Python | Python3 | py | Runtime Error | 0 | 0 | 471 | # -*- coding: utf-8 -*-
import sys
import os
import math
import itertools
def is_prime(q):
q = abs(q)
if q == 2: return True
if q < 2 or q&1 == 0: return False
return pow(2, q-1, q) == 1
for s in sys.stdin:
n = int(s)
for i in range(n-1, 3, -1):
if is_prime(i):
answer0 = ... | ||
s680131495 | p00044 | u136916346 | 1527605439 | Python | Python3 | py | Runtime Error | 0 | 0 | 1030 | #include <stdio.h>
int pm(int n,int *l){
int i,j,p=0,c=n-1,target[n-1];
for(i=0;i<n-1;i++){target[i]=i+2;}
for(i=0;i<n-1;i++){
if (!target[i]){continue;}
for(j=i;j<n-1;j=j+i+2){
if (!target[j]){continue;}
if (j!=i && target[j]%target[i]==0){target[j]=0;c--;}
}... | File "/tmp/tmpba8e1xey/tmp__jj23nh.py", line 2
int pm(int n,int *l){
^^
SyntaxError: invalid syntax
| |
s858057299 | p00044 | u894941280 | 1355934871 | Python | Python | py | Runtime Error | 0 | 0 | 260 | q=[]
for i in range(2,10000):
for j in range(2,i):
if i % j == 0:
break
else:
q.append(i)
if __name__ =='__main__':
while True:
try:
a = int(input())
ans = q.index(a)
print q[ans-1],q[ans+1]
except EOFError: break | File "/tmp/tmp1g9tstkv/tmpapu3vcac.py", line 14
print q[ans-1],q[ans+1]
^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s337875573 | p00044 | u310759044 | 1365522578 | Python | Python | py | Runtime Error | 0 | 0 | 966 | import sys
def is_prime(q):
    q = abs(q)
    if q == 2: return True
    if q < 2 or q&1 == 0: return False
    return pow(2, q-1, q) == 1
for n in sys.stdin:
    a=int(n.strip())
    b=a
  ... | File "/tmp/tmpkihobnfe/tmp4x6x8jiu.py", line 3
    q = abs(q)
^
IndentationError: expected an indented block after function definition on line 2
| |
s073194175 | p00044 | u147801965 | 1365525214 | Python | Python | py | Runtime Error | 0 | 0 | 270 | from sys import stdin
te=lambda x:pow(2,x-1,x) == 1
for i in stdin:
a=b=int(i.strip())
while 1:
a+=1
if te(a):
ans=a
break
while 1:
b-=1
if te(b):
ans2=b
break
print ans,ans2 | File "/tmp/tmpoc_7d_az/tmp6l4h11dh.py", line 15
print ans,ans2
^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s499392637 | p00044 | u542421762 | 1370094234 | Python | Python | py | Runtime Error | 0 | 0 | 729 |
import sys
primes = [2]
def solv(num):
if num < primes[-1]:
p1 = filter(lambda x: x < num)[-1]
else:
for p in prime_list(num * 2):
primes.append(p)
if num < p:
p2 = p
break
else:
if p < num:
... | File "/tmp/tmpmt_3hr2j/tmplb2ppcbh.py", line 39
print ' '.join(map(str, [p1, p2]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s498738460 | p00044 | u542421762 | 1370094349 | Python | Python | py | Runtime Error | 0 | 0 | 737 |
import sys
primes = [2]
def solv(num):
if num < primes[-1]:
p1 = filter(lambda x: x < num, primes)[-1]
else:
for p in prime_list(num * 2):
primes.append(p)
if num < p:
p2 = p
break
else:
if p < num:
... | File "/tmp/tmpc_e8trtz/tmpgzpxgm9_.py", line 39
print ' '.join(map(str, [p1, p2]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s122080096 | p00044 | u260980560 | 1384349548 | Python | Python | py | Runtime Error | 0 | 0 | 340 | M = 50100
p = [1]*M; p[0],p[1]=0,0;
pm = [0]*M; pM = [0]*M;
for i in range(2,M):
if p[i]:
for j in range(i*i,M,i): p[j] = 0
num = -1
for i in range(1,M):
pm[i] = num
if p[i]: num = i
num = -1
for i in range(M-1,2,-1):
pM[i] = num
if p[i]: num = i
while 1:
n = input()
if n==0: break
... | File "/tmp/tmpucpc9fnd/tmp7cjettes.py", line 18
print pm[n],pM[n]
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s513940817 | p00044 | u633068244 | 1393666169 | Python | Python | py | Runtime Error | 0 | 0 | 1075 | import math
 
r = 50000
sqrt = int(math.sqrt(r))
p = [1]*r
p[0] = 0
for i in range(1,sqrt):
    if p[i]:
        for j in range(2*i+1,r,i+1):
            p[j] = 0
 
while True:
  &... | File "/tmp/tmpp1u4o4k6/tmp6960bwra.py", line 2
 
^
SyntaxError: invalid syntax
| |
s762765634 | p00044 | u912237403 | 1394870550 | Python | Python | py | Runtime Error | 0 | 0 | 415 | import sys
def sieves(m):
global S
S = range(1,m+1,2)
r = int(m**.5)
h = len(S)
S[0] = 0
for i in range(h):
x = S[i]
if x>r: break
if x and i+x<h: S[i+x:h:x] = [0]*((h-1-i-x)/x+1)
S[0] = 2
return
S=[]
sieves(50001)
for s in sys.stdin:
n = int(s)
p1 = n/2... | File "/tmp/tmprwkg4nwb/tmp3vtbig2t.py", line 23
print S[p1],S[p2]
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s304191578 | p00044 | u912237403 | 1394870735 | Python | Python | py | Runtime Error | 0 | 0 | 415 | import sys
def sieves(m):
global S
S = range(1,m+1,2)
r = int(m**.5)
h = len(S)
S[0] = 0
for i in range(h):
x = S[i]
if x>r: break
if x and i+x<h: S[i+x:h:x] = [0]*((h-1-i-x)/x+1)
S[0] = 2
return
S=[]
sieves(50001)
for s in sys.stdin:
n = int(s)
p1 = n/2... | File "/tmp/tmpwn118lkg/tmpjivrzqbd.py", line 23
print S[p1],S[p2]
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s894409161 | p00044 | u912237403 | 1394882334 | Python | Python | py | Runtime Error | 0 | 0 | 359 | import sys
m = 50001
S = range(1,m+1,2)
r = int(m**.5)
h = len(S)
S[0] = 0
for i in range(h):
x = S[i]
if x>r: break
if x and i+x<h: S[i+x:h:x] = [0]*((h-1-i-x)/x+1)
S[0] = 2
for s in sys.stdin:
n = int(s)
for p1 in range(n/2-1,0,-1):
if S[p1]: break
for p2 in range((n+1)/2,m/2):
... | File "/tmp/tmpejgmqf7h/tmpxyld26fa.py", line 19
print S[p1],S[p2]
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s532520360 | p00044 | u912237403 | 1394885346 | Python | Python | py | Runtime Error | 0 | 0 | 450 | import sys,math
def sieves(m):
global S
S = range(1,m+1,2)
r = int(m**.5)
h = len(S)
S[0] = 0
for i in range(h):
x = S[i]
if x>r: break
if x and i+x<h: S[i+x:h:x] = [0]*((h-1-i-x)/x+1)
S[0] = 2
return
m = 50100
sieves(m)
for s in sys.stdin:
n = int(s)
for ... | File "/tmp/tmp1six30wp/tmpaw698x6u.py", line 22
print S[p1],S[p2]
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s778650883 | p00044 | u912237403 | 1394885411 | Python | Python | py | Runtime Error | 0 | 0 | 457 | import sys,math
def sieves(m):
global S
S = range(1,m+1,2)
r = int(m**.5)
h = len(S)
S[0] = 0
for i in range(h):
x = S[i]
if x>r: break
if x and i+x<h: S[i+x:h:x] = [0]*((h-1-i-x)/x+1)
S[0] = 2
return
m = 50100
S = []
sieves(m)
for s in sys.stdin:
n = int(s)
... | File "/tmp/tmplor7sj56/tmpby9u6j6j.py", line 23
print S[p1],S[p2]
^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s440675759 | p00044 | u246033265 | 1396804560 | Python | Python | py | Runtime Error | 0 | 0 | 437 | from bisect import *
def sieve(n):
a = range(n)
a[:2] = None, None
for i in range(2, n):
if i ** 2 >= n: break
if not a[i]: continue
for i in range(i ** 2, n, i):
a[i] = None
return [v for v in a if v]
try:
a = sieve(9000)
while True:
n = int(raw_inp... | File "/tmp/tmpz4xrd0qd/tmpp2b86iw2.py", line 18
print a[i - (2 if a[i - 1] == n else 1)], a[i]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s561483050 | p00044 | u436634575 | 1401185301 | Python | Python3 | py | Runtime Error | 0 | 0 | 400 | N = 50001
a = [True] * N
i = 3
while i * i < N:
for j in range(3 * i, N, 2 * i): a[j] = False
i += 2
while True:
try:
n = int(input())
except:
break
n0 = n + 2 if (n & 1) else n + 1
for maxv in range(n0, N, 2):
if a[maxv]: break
n0 = n - 2 if (n & 1) else n - 1
... | ||
s211018937 | p00045 | u300946041 | 1475299791 | Python | Python3 | py | Runtime Error | 0 | 0 | 463 | # -*- coding: utf-8 -*-
def sum_and_average(_input):
_sum_list = []
_avg_list = []
while 1:
try:
_sum, _avg = [int(e) for e in _input]
_sum_list.append(_sum)
_avg_list.append(_avg)
except EOFError:
break
return sum(_sum_list), (sum(_avg_... | Traceback (most recent call last):
File "/tmp/tmp11brh_sx/tmpdf411yx4.py", line 18, in <module>
_sum, _avg = sum_and_average(input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s811268252 | p00045 | u300946041 | 1475299890 | Python | Python3 | py | Runtime Error | 0 | 0 | 451 | # -*- coding: utf-8 -*-
def sum_and_average():
_sum_list = []
_avg_list = []
while 1:
try:
_sum, _avg = [int(e) for e in input().split()]
_sum_list.append(_sum)
_avg_list.append(_avg)
except EOFError:
break
return sum(_sum_list), (sum(_a... | Traceback (most recent call last):
File "/tmp/tmp_nllcpsk/tmpqku3z2n7.py", line 18, in <module>
_sum, _avg = sum_and_average()
^^^^^^^^^^^^^^^^^
File "/tmp/tmp_nllcpsk/tmpqku3z2n7.py", line 15, in sum_and_average
return sum(_sum_list), (sum(_avg_list) / len(_avg_list))
... | |
s970381802 | p00045 | u300946041 | 1475300108 | Python | Python3 | py | Runtime Error | 0 | 0 | 327 | # -*- coding: utf-8 -*-
_sum_list = []
_avg_list = []
while 1:
try:
_sum, _avg = [int(e) for e in input().split()]
_sum_list.append(_sum)
_avg_list.append(_avg)
except EOFError:
break
_sum, _avg = sum(_sum_list), sum(_avg_list) / len(_avg_list)
print(round(_sum, 1), round(_a... | Traceback (most recent call last):
File "/tmp/tmpvocc6fiz/tmpwg7xt5if.py", line 16, in <module>
_sum, _avg = sum(_sum_list), sum(_avg_list) / len(_avg_list)
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
ZeroDivisionError: division by zero
| |
s547981168 | p00045 | u300946041 | 1475300284 | Python | Python3 | py | Runtime Error | 0 | 0 | 317 | # -*- coding: utf-8 -*-
_sum_list = []
_avg_list = []
while 1:
try:
_sum, _avg = [int(e) for e in input().split()]
_sum_list.append(_sum)
_avg_list.append(_avg)
except:
break
_sum, _avg = sum(_sum_list), sum(_avg_list) / len(_avg_list)
print(round(_sum, 1), round(_avg, 1)) | Traceback (most recent call last):
File "/tmp/tmpu68o3kdz/tmpp6wkf_qn.py", line 15, in <module>
_sum, _avg = sum(_sum_list), sum(_avg_list) / len(_avg_list)
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
ZeroDivisionError: division by zero
| |
s294948625 | p00045 | u546285759 | 1482921299 | Python | Python3 | py | Runtime Error | 0 | 0 | 181 | a, b = [], []
while True:
try:
x, y = map(int, line.strip().split(","))
a, b = a+[x*y], b+[y]
except:
break
print(sum(a))
print(round(sum(b)/len(b))) | Traceback (most recent call last):
File "/tmp/tmpiy47d0vo/tmp3nbwtb98.py", line 9, in <module>
print(round(sum(b)/len(b)))
~~~~~~^~~~~~~
ZeroDivisionError: division by zero
| 0
|
s001808026 | p00045 | u786299861 | 1500643933 | Python | Python3 | py | Runtime Error | 0 | 0 | 242 | # _*_ coding: utf-8 _*_
sum = 0
total = 0
cnt = 0
while True:
s = input()
if s == '':
break
list = s.split(',')
sum += int(list[0])*int(list[1])
total += int(list[1])
cnt += 1
ave = total / cnt + 0.5
print(sum)
print(int(ave)) | Traceback (most recent call last):
File "/tmp/tmp9h0jwd97/tmp6716wcll.py", line 8, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s528061313 | p00045 | u786299861 | 1500644067 | Python | Python | py | Runtime Error | 0 | 0 | 242 | # _*_ coding: utf-8 _*_
sum = 0
total = 0
cnt = 0
while True:
s = input()
if s == '':
break
list = s.split(',')
sum += int(list[0])*int(list[1])
total += int(list[1])
cnt += 1
ave = total / cnt + 0.5
print(sum)
print(int(ave)) | Traceback (most recent call last):
File "/tmp/tmpfahlxq4g/tmp4q6dd42_.py", line 8, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s068912337 | p00045 | u786299861 | 1500644730 | Python | Python3 | py | Runtime Error | 0 | 0 | 217 | sum = 0
total = 0
cnt = 0
while True:
s = input()
if s == '':
break
list = s.split(',')
sum += int(list[0])*int(list[1])
total += int(list[1])
cnt += 1
ave = total / cnt + 0.5
print(sum)
print(int(ave)) | Traceback (most recent call last):
File "/tmp/tmpur889i94/tmp0ecf8upl.py", line 6, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s592007717 | p00045 | u350064373 | 1501556391 | Python | Python3 | py | Runtime Error | 0 | 0 | 221 | try:
while True:
result = result2 = count = 0
a, b = map(int, input().split(','))
result += a*b
result2 += b
count += 1
except:
print(result,"{0:.1f}".format(result2/count)) | Traceback (most recent call last):
File "/tmp/tmpi7yyi3v1/tmp7hepmavl.py", line 4, in <module>
a, b = map(int, input().split(','))
^^^^^^^
EOFError: EOF when reading a line
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/tmp... | |
s728293752 | p00045 | u498511622 | 1501556585 | Python | Python | py | Runtime Error | 0 | 0 | 161 | total=0
s=0
i=0
while True:
try:
a,b = map(int,input().split(','))
total += a*b
s+=b
i+=1
except:
result=s/i
print(total)
print(round(result)) | Traceback (most recent call last):
File "/tmp/tmpx3dps2zn/tmp74ss2ow1.py", line 6, in <module>
a,b = map(int,input().split(','))
^^^^^^^
EOFError: EOF when reading a line
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/tmpx3dp... | |
s372235637 | p00045 | u498511622 | 1501556629 | Python | Python | py | Runtime Error | 0 | 0 | 161 | total=0
s=0
i=0
try:
while True:
a,b = map(int,input().split(','))
total += a*b
s+=b
i+=1
except:
result=s/i
print(total)
print(round(result)) | Traceback (most recent call last):
File "/tmp/tmpj07lq4oq/tmpzmwj6ncz.py", line 6, in <module>
a,b = map(int,input().split(','))
^^^^^^^
EOFError: EOF when reading a line
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/tmpj07l... | |
s329744541 | p00045 | u498511622 | 1501556901 | Python | Python3 | py | Runtime Error | 0 | 0 | 152 | total=0
s=0
i=0
try:
while True:
a,b = map(int,input().split(','))
total += a*b
s+=b
i+=1
except:
result=s/i
print(total)
print(round(result)) | File "/tmp/tmp2yoh1wd1/tmp6ipn2lan.py", line 11
result=s/i
^
IndentationError: expected an indented block after 'except' statement on line 10
| |
s491180005 | p00045 | u350064373 | 1501557805 | Python | Python3 | py | Runtime Error | 0 | 0 | 222 | try:
result = result2 = count = 0
while True:
a, b = map(int, input().split(','))
result += a*b
result2 += b
count += 1
except:
print(result)
print((round(result2/count+0.5)) | File "/tmp/tmp90fnrtsa/tmp1k1gar5i.py", line 10
print((round(result2/count+0.5))
^
SyntaxError: '(' was never closed
| |
s353734665 | p00045 | u633068244 | 1393667467 | Python | Python | py | Runtime Error | 0 | 0 | 205 | i, all, sum = 0, 0, 0
while True:
try:
price, n = map(int, raw_input().split(",")))
i += 1; all += n; sum += price
except
break
print sum
print int(round(float(all)/i)) | File "/tmp/tmpxazeot67/tmp0fq6a9w9.py", line 4
price, n = map(int, raw_input().split(",")))
^
SyntaxError: unmatched ')'
| |
s956313629 | p00045 | u633068244 | 1393667484 | Python | Python | py | Runtime Error | 0 | 0 | 204 | i, all, sum = 0, 0, 0
while True:
try:
price, n = map(int, raw_input().split(","))
i += 1; all += n; sum += price
except
break
print sum
print int(round(float(all)/i)) | File "/tmp/tmp4mht7pp4/tmpzruaszo0.py", line 6
except
^
SyntaxError: expected ':'
| |
s735341633 | p00045 | u436634575 | 1401185775 | Python | Python3 | py | Runtime Error | 0 | 0 | 126 | import sys
s = c = 0
for line in sys.stdin:
x, y = map(int line.split())
s += x * y
c += y
print(s, round(s / c)) | File "/tmp/tmp7b69jkx0/tmp3g2d51xb.py", line 5
x, y = map(int line.split())
^^^^^^^^^^^^^^^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?
| |
s670057487 | p00045 | u436634575 | 1401185802 | Python | Python3 | py | Runtime Error | 0 | 0 | 129 | import sys
s = c = 0
for line in sys.stdin:
x, y = map(int line.split(','))
s += x * y
c += y
print(s, round(s / c)) | File "/tmp/tmpp7rb5r5l/tmp0sjb_y1o.py", line 5
x, y = map(int line.split(','))
^^^^^^^^^^^^^^^^^^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?
| |
s123767376 | p00046 | u814278309 | 1558934252 | Python | Python3 | py | Runtime Error | 0 | 0 | 72 | import sys
a=list(map(float,sys.stdin.readline()))
print(max(a)-min(a))
| Traceback (most recent call last):
File "/tmp/tmpr4mkvfsd/tmpqcn5sbc2.py", line 3, in <module>
print(max(a)-min(a))
^^^^^^
ValueError: max() arg is an empty sequence
| |
s690915138 | p00046 | u879226672 | 1425396417 | Python | Python | py | Runtime Error | 0 | 0 | 177 | ls = []
while True:
try:
data = map(float,raw_input().split())
ls.append(data)
except EOFError:
break
ls.sort()
ans = ls[-1]-ls[0]
print ans
| File "/tmp/tmpc4ym0h84/tmpkia1ao52.py", line 10
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s521228028 | p00046 | u879226672 | 1425396476 | Python | Python | py | Runtime Error | 0 | 0 | 168 | ls = []
while True:
try:
data = float(raw_input().split())
ls.append(data)
except EOFError:
break
ls.sort()
ans = ls[-1]-ls[0]
print ans | File "/tmp/tmpi_49nzt9/tmpg4tsjkty.py", line 10
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s676441851 | p00046 | u746468741 | 1461315243 | Python | Python3 | py | Runtime Error | 0 | 0 | 80 | A=[]
for i in range(0,5):
a=float(input())
A.append(a)
print(max(A)-min(B)) | Traceback (most recent call last):
File "/tmp/tmp_vkm44ja/tmp_i2i83_s.py", line 3, in <module>
a=float(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s269594228 | p00046 | u746468741 | 1461582288 | Python | Python3 | py | Runtime Error | 0 | 0 | 81 | A=[]
while not a == false:
a=float(input())
A.append(a)
print(max(A)-min(A)) | Traceback (most recent call last):
File "/tmp/tmpdi6sdpax/tmpqbo_ir6g.py", line 2, in <module>
while not a == false:
^
NameError: name 'a' is not defined. Did you mean: 'A'?
| |
s937330250 | p00046 | u746468741 | 1461826365 | Python | Python3 | py | Runtime Error | 0 | 0 | 81 | A=[]
do:
a=float(input())
A.append(a)
while a != Null:
print(max(A)-min(A)) | File "/tmp/tmpfyj1si36/tmpefa3v72t.py", line 2
do:
^
SyntaxError: invalid syntax
| |
s290578244 | p00046 | u746468741 | 1461826442 | Python | Python3 | py | Runtime Error | 0 | 0 | 80 | A=[]
do:
a=float(input())
A.append(a)
while a != Null
print(max(A)-min(A)) | File "/tmp/tmp7w2d0l3y/tmppyjb_wrh.py", line 2
do:
^
SyntaxError: invalid syntax
| |
s178305029 | p00046 | u746468741 | 1461826770 | Python | Python3 | py | Runtime Error | 0 | 0 | 99 |
A=[]
while True:
a=float(input())
A.append(a)
if a==Null:
break
print(max(A)-min(A)) | File "/tmp/tmpe8nlls5y/tmp_xnqxqt3.py", line 3
while True:
IndentationError: unexpected indent
| |
s279238785 | p00046 | u746468741 | 1461826849 | Python | Python3 | py | Runtime Error | 0 | 0 | 99 |
A=[]
while True:
a=float(input())
A.append(a)
if a==Null:
break
print(max(A)-min(A)) | File "/tmp/tmpzcul_qmh/tmpnpfl0trj.py", line 3
while True:
IndentationError: unexpected indent
| |
s170704682 | p00046 | u862440080 | 1473937444 | Python | Python3 | py | Runtime Error | 0 | 0 | 70 | inputs = [flaot(i) for i in input()]
print(max(inputs) - min(inputs)) | Traceback (most recent call last):
File "/tmp/tmpl35y_kpp/tmpz8lvzfy9.py", line 1, in <module>
inputs = [flaot(i) for i in input()]
^^^^^^^
EOFError: EOF when reading a line
| |
s911767102 | p00046 | u862440080 | 1473937512 | Python | Python3 | py | Runtime Error | 0 | 0 | 70 | inputs = [float(i) for i in input()]
print(max(inputs) - min(inputs)) | Traceback (most recent call last):
File "/tmp/tmpp8ap6qw3/tmp1gc37afb.py", line 1, in <module>
inputs = [float(i) for i in input()]
^^^^^^^
EOFError: EOF when reading a line
| |
s044935236 | p00046 | u866760195 | 1378346578 | Python | Python | py | Runtime Error | 0 | 0 | 179 | fir=0
sec=0
while True:
a=raw_input()
if a >= fir:
sec = fir
fir = a
elif a >= sec:
sec = a
print fir-sec | File "/tmp/tmpq1w_nm1f/tmpyd668ayb.py", line 12
print fir-sec
^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s000434035 | p00046 | u866760195 | 1378346708 | Python | Python | py | Runtime Error | 0 | 0 | 287 | fir=0
sec=0
while True:
try:
a=raw_input()
if a >= fir:
sec = fir
fir = a
elif a >= sec:
sec = a
except EOFError:
break
print fir-sec | File "/tmp/tmp_vry0rjb/tmp1s5gpwzk.py", line 15
print fir-sec
^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s423380106 | p00046 | u866760195 | 1378346907 | Python | Python | py | Runtime Error | 0 | 0 | 207 | import sys
fir=0
sec=0
for line in sys.stdin:
a=float(raw_input())
if a >= fir:
sec = fir
fir = a
elif a >= sec:
sec = a
print fir-sec | File "/tmp/tmpzi1x4o3d/tmp53psfkbk.py", line 12
print fir-sec
^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s187700379 | p00046 | u866760195 | 1378346994 | Python | Python | py | Runtime Error | 0 | 0 | 204 | import sys
fir=0
sec=0
for a in sys.stdin:
a=float(raw_input())
if a >= fir:
sec = fir
fir = a
elif a >= sec:
sec = a
print fir-sec | File "/tmp/tmpb5iauey8/tmps71g6s3_.py", line 12
print fir-sec
^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s618232857 | p00046 | u866760195 | 1378347128 | Python | Python | py | Runtime Error | 0 | 0 | 202 | import sys
fir=0
las=0
for a in sys.stdin:
a=float(raw_input())
if a >= fir:
fir = a
a = las
elif a <= las:
las = a
print fir-las | File "/tmp/tmpg9ahyhde/tmpa5op2ofy.py", line 12
print fir-las
^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s718860604 | p00046 | u866760195 | 1378347382 | Python | Python | py | Runtime Error | 0 | 0 | 155 | a=[]
while True:
try:
i=raw_input()
except EOFError:
break
a.append(i)
print "%f" %(max(a)-min(a)) | File "/tmp/tmp34r5mcjl/tmprgs9oj6e.py", line 9
print "%f" %(max(a)-min(a))
^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s217138569 | p00046 | u866760195 | 1378347398 | Python | Python | py | Runtime Error | 0 | 0 | 157 | a=[]
while True:
try:
i=raw_input()
except EOFError:
break
a.append(i)
print "%f" %(max(a)-min(a), ) | File "/tmp/tmpwausyx0i/tmpd9f_sv5y.py", line 9
print "%f" %(max(a)-min(a), )
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s199762106 | p00046 | u866760195 | 1378347619 | Python | Python | py | Runtime Error | 0 | 0 | 120 | a=[]
while True:
try:
i=raw_input()
a.append(i)
print "%f" %(max(a)-min(a)) | File "/tmp/tmp3b6fjdhi/tmpofe6arer.py", line 7
print "%f" %(max(a)-min(a))
SyntaxError: expected 'except' or 'finally' block
| |
s081910669 | p00046 | u633068244 | 1393583930 | Python | Python | py | Runtime Error | 0 | 0 | 92 | i = 0
while 1:
try:
a[i] = float(raw_input())
a.sort()
print a[len(a)-1] - a[0] | File "/tmp/tmpi7aavp86/tmpios_pr4m.py", line 5
a.sort()
SyntaxError: expected 'except' or 'finally' block
| |
s489331326 | p00046 | u633068244 | 1393583991 | Python | Python | py | Runtime Error | 0 | 0 | 116 | i = 0
a=[]
while 1:
try:
a.append(float(raw_input()))
i += 1
a.sort()
print a[len(a)-1] - a[0] | File "/tmp/tmprt9rq3qb/tmpwhiqfue0.py", line 7
a.sort()
SyntaxError: expected 'except' or 'finally' block
| |
s022845907 | p00046 | u633068244 | 1393584048 | Python | Python | py | Runtime Error | 0 | 0 | 94 | a=[]
while 1:
try:
a.append(float(raw_input()))
a.sort()
print a[len(a)-1] - a[0] | File "/tmp/tmpg20n51sl/tmpex754ktn.py", line 5
a.sort()
SyntaxError: expected 'except' or 'finally' block
| |
s668075387 | p00046 | u633068244 | 1393584084 | Python | Python | py | Runtime Error | 0 | 0 | 109 | a=[]
while 1:
try:
h = float(row_input())
a.append(h)
a.sort()
print a[len(a)-1] - a[0] | File "/tmp/tmp0oparjmg/tmpmza91vjn.py", line 6
a.sort()
SyntaxError: expected 'except' or 'finally' block
| |
s796305375 | p00046 | u633068244 | 1393584131 | Python | Python | py | Runtime Error | 0 | 0 | 112 | a=[]
while True:
try:
h = float(row_input())
a.append(h)
a.sort()
print a[len(a)-1] - a[0] | File "/tmp/tmpvdqi8y4j/tmp7afmz8h0.py", line 6
a.sort()
SyntaxError: expected 'except' or 'finally' block
| |
s175154663 | p00046 | u633068244 | 1393584189 | Python | Python | py | Runtime Error | 0 | 0 | 115 | a=[]
while True:
try:
h = float(row_input())
a.append(h)
except:
break
a.sort()
print a[len(a)-1] - a[0] | File "/tmp/tmp6j4q2qyd/tmpyyk2pzru.py", line 4
h = float(row_input())
TabError: inconsistent use of tabs and spaces in indentation
| |
s763047912 | p00047 | u560838141 | 1410781968 | Python | Python | py | Runtime Error | 0 | 0 | 158 | ball = 0
while True:
try:
a, b = map(lambda x: ord(x) - ord("A") raw_input().strip().split(","))
if (a == ball):
ball = b;
print chr(ball + ord("A")) | File "/tmp/tmpzmxtor4a/tmphh9qwx9b.py", line 4
a, b = map(lambda x: ord(x) - ord("A") raw_input().strip().split(","))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?
| |
s099514964 | p00047 | u560838141 | 1410781989 | Python | Python | py | Runtime Error | 0 | 0 | 176 | ball = 0
while True:
try:
a, b = map(lambda x: ord(x) - ord("A") raw_input().strip().split(","))
if (a == ball):
ball = b;
except:
break;
print chr(ball + ord("A")) | File "/tmp/tmp1r5ka2k5/tmpo31dd4nz.py", line 4
a, b = map(lambda x: ord(x) - ord("A") raw_input().strip().split(","))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?
| |
s158902473 | p00047 | u935184340 | 1468122049 | Python | Python3 | py | Runtime Error | 0 | 0 | 354 | let () =
let rec read pos =
try let l = read_line ()
|> Str.split (Str.regexp_string ",")
in
if (List.nth l 0) = pos then
read (List.nth l 1)
else if (List.nth l 1) = pos then
read (List.nth l 0)
else
read pos
with End_of_file -> po... | File "/tmp/tmp0ytxis7k/tmpw4oe4_9a.py", line 1
let () =
^^^^^^
SyntaxError: cannot assign to function call
| |
s871873229 | p00047 | u300946041 | 1471267951 | Python | Python3 | py | Runtime Error | 0 | 0 | 170 | import sys
d = {'A': 1, 'B': 0, 'C': 0}
for line in sys.stdin:
a, t = line.split(',')
d[a], d[t] = d[t], d[a]
for k, v in d.items():
if v:
print(k) | A
| |
s872967539 | p00047 | u300946041 | 1471268069 | Python | Python3 | py | Runtime Error | 0 | 0 | 170 | import sys
d = {'A': 1, 'B': 0, 'C': 0}
for line in sys.stdin:
a, t = line.split(',')
d[a], d[t] = d[t], d[a]
for k, v in d.items():
if v:
print(k) | A
| |
s917134121 | p00047 | u300946041 | 1471268183 | Python | Python3 | py | Runtime Error | 0 | 0 | 186 | import sys
d = {'A': 1, 'B': 0, 'C': 0}
_input = sys.stdin
for line in _input:
a, t = line.split(',')
d[a], d[t] = d[t], d[a]
for k, v in d.items():
if v:
print(k) | A
| |
s835000232 | p00047 | u300946041 | 1471268292 | Python | Python3 | py | Runtime Error | 0 | 0 | 178 | import sys
d = {'A': 1, 'B': 0, 'C': 0}
for line in sys.stdin:
a, t = line.split().split(',')
d[a], d[t] = d[t], d[a]
for k, v in d.items():
if v:
print(k) | A
| |
s186321564 | p00047 | u300946041 | 1471268322 | Python | Python3 | py | Runtime Error | 0 | 0 | 189 | import sys
d = {'A': True, 'B': False, 'C': False}
for line in sys.stdin:
a, t = line.split().split(',')
d[a], d[t] = d[t], d[a]
for k, v in d.items():
if v:
print(k) | A
| |
s778220471 | p00047 | u300946041 | 1471268470 | Python | Python3 | py | Runtime Error | 0 | 0 | 224 | d = {'A': True, 'B': False, 'C': False}
while True:
try:
line = input()
except:
break
a, t = line.split().split(',')
d[a], d[t] = d[t], d[a]
for k, v in d.items():
if v:
print(k) | A
| |
s241289625 | p00047 | u300946041 | 1471268714 | Python | Python3 | py | Runtime Error | 0 | 0 | 181 | import sys
d = {'A': True, 'B': False, 'C': False}
for line in sys.stdin:
a, t = line.split(',')
d[a], d[t] = d[t], d[a]
for k, v in d.items():
if v:
print(k) | A
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.