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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s538668369 | p00021 | u193025715 | 1395414833 | Python | Python | py | Runtime Error | 0 | 0 | 241 | n = int(raw_input())
ans = []
for i in range(n):
marks = map(float, raw_input().split())
AB = (marks[1] - marks[3]) / (marks[0] - marks[2])
CD = (marks[5] - marks[7]) / (marks[4] - marks[6])
if AB == CD:
print 'YES'
else:
print 'NO' | File "/tmp/tmpfj7s9fou/tmp22hmceio.py", line 8
print 'YES'
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s013940981 | p00021 | u193025715 | 1395414918 | Python | Python | py | Runtime Error | 0 | 0 | 232 | n = int(raw_input())
for i in range(n):
marks = map(float, raw_input().split())
AB = (marks[1] - marks[3]) / (marks[0] - marks[2])
CD = (marks[5] - marks[7]) / (marks[4] - marks[6])
if AB == CD:
print 'YES'
else:
print 'NO' | File "/tmp/tmp52cku7t2/tmptcjnnm64.py", line 7
print 'YES'
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s811928393 | p00021 | u193025715 | 1395914294 | Python | Python | py | Runtime Error | 0 | 0 | 187 | for i in range(input()):
ax,ay,bx,by,cx,cy,dx,dy = map(float, raw_input().split())
ab = (ay - by) / (ax - bx)
cd = (cy - dy) / (cx - dx)
if ab == cd:
print "YES"
else:
print "NO" | File "/tmp/tmp0uki7qa5/tmpf245v6b_.py", line 6
print "YES"
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s446438113 | p00021 | u193025715 | 1395914388 | Python | Python | py | Runtime Error | 0 | 0 | 196 | for i in range(input()):
ax,ay,bx,by,cx,cy,dx,dy = map(float, raw_input().split())
ab = (ay - by) / (ax - bx)
cd = (cy - dy) / (cx - dx)
if int(ab - cd) == 0:
print "YES"
else:
print "NO" | File "/tmp/tmpremg6kx7/tmpxex_i2tw.py", line 6
print "YES"
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s634277835 | p00021 | u858885710 | 1396776285 | Python | Python | py | Runtime Error | 0 | 0 | 142 | p = map( float, raw_input().split() )
flag = ( p[ 1 ] - p[ 0 ] ) * ( p[ 7 ] - p[ 6 ] ) == ( p[ 3 ] - p[ 2 ] ) * ( p[ 5 ] - p[ 4 ] )
print flag | File "/tmp/tmpvu1zaj2c/tmpi216mynq.py", line 3
print flag
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s261580858 | p00021 | u858885710 | 1396776385 | Python | Python | py | Runtime Error | 0 | 0 | 164 | p = map( float, raw_input().split() )
flag = ( p[ 1 ] - p[ 0 ] ) * ( p[ 7 ] - p[ 6 ] ) == ( p[ 3 ] - p[ 2 ] ) * ( p[ 5 ] - p[ 4 ] )
print ( flag and 'YES' ) or 'NO' | Traceback (most recent call last):
File "/tmp/tmpx4jdyfui/tmp_r8wkwiq.py", line 1, in <module>
p = map( float, raw_input().split() )
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s461689752 | p00021 | u858885710 | 1396776452 | Python | Python | py | Runtime Error | 0 | 0 | 208 | n = int(raw_input)
for i in range(n):
p = map( float, raw_input().split() )
flag = ( p[ 1 ] - p[ 0 ] ) * ( p[ 7 ] - p[ 6 ] ) == ( p[ 3 ] - p[ 2 ] ) * ( p[ 5 ] - p[ 4 ] )
print ( flag and 'YES' ) or 'NO' | Traceback (most recent call last):
File "/tmp/tmpo5lzgqz5/tmp3mkp7eit.py", line 1, in <module>
n = int(raw_input)
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s112227274 | p00021 | u858885710 | 1397822405 | Python | Python | py | Runtime Error | 0 | 0 | 611 | #include <stdio.h>
#define ERROR_RANGE 0.000001
int main(void){
int cnt,flg;
double x1,y1,x2,y2,x3,y3,x4,y4;
scanf("%d",&cnt);
while(cnt-- > 0){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf",
&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
if( (x1 - x2) < ERROR_RANGE || (x3 - x4) < ERROR_RANGE ){
flg = ((x1 - x2) < ERROR_RANGE && (x3 - x4) < ERROR_RANGE);
}else{
flg = (x1 - x2)/(y1 - y2) - (x3 - x4)/(y3 - y4) < ERROR_RANGE;
}
if(flg){
puts("YES");
}else{
puts("NO");
}
}
return 0;
} | File "/tmp/tmpqyvrus7d/tmp60msje4j.py", line 5
int main(void){
^^^^
SyntaxError: invalid syntax
| |
s400483308 | p00021 | u858885710 | 1397822620 | Python | Python | py | Runtime Error | 0 | 0 | 609 | #include <stdio.h>
#define ERROR_RANGE 0.000001
int main(void){
int cnt,flg;
double x1,y1,x2,y2,x3,y3,x4,y4;
scanf("%d",&cnt);
while(cnt-- > 0){
scanf("%lf %lf %lf %lf %lf %lf %lf %lf",
&x1,&y1,&x2,&y2,&x3,&y3,&x4,&y4);
if( (x1 - x2) < ERROR_RANGE || (x3 - x4) < ERROR_RANGE ){
flg = ((x1 - x2) < ERROR_RANGE && (x3 - x4) < ERROR_RANGE);
}else{
flg = (x1 - x2)/(y1 - y2) - (x3 - x4)/(y3 - y4) < ERROR_RANGE;
}
if(flg){
puts("YES");
}else{
puts("NO");
}
}
return 0;
} | File "/tmp/tmppcju1bx3/tmp6vgqzlco.py", line 3
int main(void){
^^^^
SyntaxError: invalid syntax
| |
s735368184 | p00021 | u193025715 | 1398060527 | Python | Python | py | Runtime Error | 0 | 0 | 250 | for i in range(input()):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().split())
if (x1 == x2 and x3 == x4) or (y1 == y2 and y3 == y4):
print "YES"
continue
elif (y1-y2)/(x1-x2) == (y3-y4)/(x3-x4):
print "YES"
continue
print "NO" | File "/tmp/tmpyews9fa_/tmpm4iyk5w7.py", line 4
print "YES"
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s087148415 | p00021 | u193025715 | 1398061035 | Python | Python | py | Runtime Error | 0 | 0 | 184 | for i in range(input()):
x1, y1, x2, y2, x3, y3, x4, y4 = map(lambda x: return "%f" % x, raw_input().split())
if (y1-y2)*(x3-x4) == (y3-y4)*(x1-x2):
print "YES"
else:
print "NO" | File "/tmp/tmpgh3euagq/tmphpl82yvf.py", line 2
x1, y1, x2, y2, x3, y3, x4, y4 = map(lambda x: return "%f" % x, raw_input().split())
^^^^^^
SyntaxError: invalid syntax
| |
s625420836 | p00021 | u708217907 | 1398509494 | Python | Python | py | Runtime Error | 0 | 0 | 316 | import sys
def parallels(x1, y1, x2, y2, x3, y3, x4, y4):
a1 = (y2-y1)/(x2-x1)
a2 = (y4-y3)/(x4-x3)
return a1 == a2
n = int(input())
for i in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().split(' '))
if parallels(x1, y1, x2, y2, x3, y3, x4, y4):
print 'YES'
else:
print 'NO' | File "/tmp/tmpo0n4e4b2/tmpaf5bvefh.py", line 12
print 'YES'
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s859577760 | p00021 | u708217907 | 1398509596 | Python | Python | py | Runtime Error | 0 | 0 | 478 | import sys
def parallels(x1, y1, x2, y2, x3, y3, x4, y4):
a1 = (y2-y1)/(x2-x1)
a2 = (y4-y3)/(x4-x3)
return a1 == a2
n = int(input())
for i in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, raw_input().split(' '))
if y1-y2 == 0 and x3-x4 == 0:
print 'YES'
elif y1-y2 != 0 and x3-x4 == 0:
print 'NO'
elif y1-y2 == 0 and x3-x4 != 0:
print 'NO'
else:
if parallels(x1, y1, x2, y2, x3, y3, x4, y4):
print 'YES'
else:
print 'NO' | File "/tmp/tmpunde30vn/tmpn6y2hiig.py", line 12
print 'YES'
^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s332963444 | p00021 | u436634575 | 1401142732 | Python | Python3 | py | Runtime Error | 0 | 0 | 184 | n = int(input())
for i in range(n):
x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
print('YES' if abs(x2 - x1)*(y4 - y3) - (x4 - x3)*(y2 - y1)) < 1e-10 else 'NO') | File "/tmp/tmpg27icjyg/tmpl53fnkwm.py", line 4
print('YES' if abs(x2 - x1)*(y4 - y3) - (x4 - x3)*(y2 - y1)) < 1e-10 else 'NO')
^
SyntaxError: unmatched ')'
| |
s925683465 | p00022 | u506132575 | 1416131361 | Python | Python | py | Runtime Error | 0 | 0 | 387 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
lis = []
lis2 = []
def sum(lis):
s = 0
for e in lis:
s += e
return s
while True:
num = input()
if num == 0:
break
else:
lis = []
lis2 = []
for i in range(num):
n = input()
if i == 0:
d = n
else:
d = max( d + n , n )
lis.append(d)
print max(lis) | File "/tmp/tmp720ghl6h/tmpwhya8ov8.py", line 29
print max(lis)
^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s022910671 | p00022 | u506132575 | 1416131412 | Python | Python | py | Runtime Error | 0 | 0 | 313 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
lis = []
lis2 = []
while True:
num = input()
if num == 0:
break
else:
lis = []
for i in range(num):
n = input()
if i == 0:
d = n
else:
d = max( d + n , n )
lis.append(d)
print max(lis) | File "/tmp/tmpjrhcfwoz/tmpydjhew19.py", line 23
print max(lis)
^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s889858246 | p00022 | u506132575 | 1416131608 | Python | Python | py | Runtime Error | 0 | 0 | 254 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
while True:
num = input()
if num == 0:
break
lis = []
for i in range(num):
n = input()
if i == 0:
d = n
else:
d = max( d + n , n )
lis.append(d)
print max(lis) | File "/tmp/tmpuco2kjm0/tmpe80yimgj.py", line 16
print max(lis)
^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s760602460 | p00022 | u342537066 | 1420712774 | Python | Python3 | py | Runtime Error | 0 | 0 | 172 | while True:
n=int(input())
a=[]
for i in range(n):
a.append(int(input()))
for i in range(1,n):
a[i]=max(a[i-1]+a[i],a[i])
print(max(a)) | Traceback (most recent call last):
File "/tmp/tmp74_sfh5t/tmpyronl675.py", line 2, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s264000356 | p00022 | u379956761 | 1434986389 | Python | Python3 | py | Runtime Error | 0 | 0 | 182 | while 1:
n = int(input())
a = [int(input()) for _ in range(n)]
dp = [a[0]]
for i in range(1,len(a)):
dp.append(max(dp[i-1] + a[i], a[i]))
print(max(dp)) | Traceback (most recent call last):
File "/tmp/tmpejqjtytf/tmpnnrgp61b.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s523964057 | p00022 | u379956761 | 1434986432 | Python | Python3 | py | Runtime Error | 0 | 0 | 206 | while 1:
n = int(input())
a = []
for _ in range(n):
a.append(int(input()))
dp = [a[0]]
for i in range(1,len(a)):
dp.append(max(dp[i-1] + a[i], a[i]))
print(max(dp)) | Traceback (most recent call last):
File "/tmp/tmp9s5wukyy/tmpqlqnzkml.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s296657451 | p00022 | u379956761 | 1434986528 | Python | Python3 | py | Runtime Error | 0 | 0 | 206 | while 1:
n = int(input())
a = []
for _ in range(n):
a.append(int(input()))
dp = [a[0]]
for i in range(1,len(a)):
dp.append(max(dp[i-1] + a[i], a[i]))
print(max(dp)) | Traceback (most recent call last):
File "/tmp/tmp9p36mrkn/tmppsb89ujz.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s470948772 | p00022 | u797673668 | 1456640777 | Python | Python3 | py | Runtime Error | 0 | 0 | 1349 | class Node:
prev = next = None
def __init__(self, value):
self.value = value
def get_nxnx(self):
next_n = self.next
if not next_n: return None, None
return next_n, next_n.next
def get_prpr(self):
prev_n = self.prev
if not prev_n: return None, None
return prev_n, prev_n.prev
def combine(self):
next_n, nxnx_n = self.get_nxnx()
if not next_n or not nxnx_n: return False
if self.value > abs(next_n.value) < nxnx_n.value:
self.value += next_n.value + nxnx_n.value
self.next = nxnx_n.next
_, prpr = self.get_prpr()
if prpr:
prpr.combine()
return True
return False
def iter(self):
a = self
while a:
yield a.value
a = a.next
while True:
n = int(input())
if not n:
break
a0 = a = Node(int(input()))
n -= 1
while n:
an = int(input())
if an * a.value < 0:
at = Node(an)
at.prev = a
a.next = at
a = at
else:
a.value += an
n -= 1
if a0.value < 0:
a0 = a0.next
a = a0
while a:
while a.combine():
pass
_, a = a.get_nxnx()
print(max(v for v in a0.iter())) | Traceback (most recent call last):
File "/tmp/tmpz4szph2i/tmps2z2lq87.py", line 38, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s511067562 | p00022 | u650459696 | 1458710130 | Python | Python3 | py | Runtime Error | 0 | 0 | 178 | while True:
n = int(input())
if n == 0:
break
dp = [0]
for i in range(n):
a = int(input()))
dp[i] = (max(dp[i] + a, a))
print(max(dp)) | File "/tmp/tmpv5fm7s8i/tmpk9yi2aub.py", line 7
a = int(input()))
^
SyntaxError: unmatched ')'
| |
s216100014 | p00022 | u075836834 | 1458764096 | Python | Python3 | py | Runtime Error | 0 | 0 | 310 | while True:
n=int(input())
if n==0:
break
A=[]
for i in range(n):
A.append(int(input()))
start=0
for i in A:
if i<=0:
start+=1
else:
break
B=A[start:]
end=len(B)
MAX=[0]*end
for i in range(end):
for j in range(i+1,end+1):
s=sum(B[i:j])
if MAX[i]<s:
MAX[i]=s
print(max(MAX)) | Traceback (most recent call last):
File "/tmp/tmprohy7fyn/tmpss_4hlk3.py", line 2, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s538458128 | p00022 | u075836834 | 1458764115 | Python | Python3 | py | Runtime Error | 0 | 0 | 310 | while True:
n=int(input())
if n==0:
break
A=[]
for i in range(n):
A.append(int(input()))
start=0
for i in A:
if i<=0:
start+=1
else:
break
B=A[start:]
end=len(B)
MAX=[0]*end
for i in range(end):
for j in range(i+1,end+1):
s=sum(B[i:j])
if MAX[i]<s:
MAX[i]=s
print(max(MAX)) | Traceback (most recent call last):
File "/tmp/tmpt1bgz0ij/tmp9zyr8num.py", line 2, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s742332366 | p00022 | u075836834 | 1458764162 | Python | Python3 | py | Runtime Error | 0 | 0 | 318 | while True:
n=int(input())
if n==0:
break
A=[]
for i in range(n):
A.append(int(input()))
start=0
for i in A:
if i<=0:
start+=1
else:
break
B=A[start:len(A)+1]
end=len(B)
MAX=[0]*end
for i in range(end):
for j in range(i+1,end+1):
s=sum(B[i:j])
if MAX[i]<s:
MAX[i]=s
print(max(MAX)) | Traceback (most recent call last):
File "/tmp/tmppf_bdjvl/tmpkv7rmqqe.py", line 2, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s887317044 | p00022 | u512342660 | 1458834460 | Python | Python | py | Runtime Error | 0 | 0 | 1344 | #! -*-coding:utf-8-*-
def signCheck(argn):
if argn>0:
return 1
elif argn==0:
return 1
else:
return -1
def maxSumSequence(nums):
pluslist=[]
minuslist=[]
prenum = 0
presign=signCheck(nums[0])
begin=presign
nsum=0
for num in nums:
nowsign=signCheck(num)
if nowsign>0:
if presign==nowsign:
nsum+=num
else:
minuslist.append(nsum)
nsum=num
#?¬?????????????????????????????????????
else:
if presign==nowsign:
nsum+=num
else:
pluslist.append(nsum)
nsum=num
presign=nowsign
if nowsign>0:
pluslist.append(nsum)
else:
minuslist.append(nsum)
if begin<0:
del minuslist[0]
if nowsign<0:
minuslist[-1]=0
sumlist=[]
sumlist.append(pluslist[0])
del pluslist[0]
for pnum,mnum in zip(pluslist,minuslist):
sumlist.append(pnum+mnum)
return sumlist
def main():
while True:
n=input()
if n==0:
break
nums = []
for i in xrange(n):
nums.append(input())
while len(nums)>1:
nums = maxSumSequence(nums)
print nums[0]
if __name__ == '__main__':
main() | File "/tmp/tmp5h_f7jtd/tmpg4jqgg09.py", line 60
print nums[0]
^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s518611353 | p00022 | u148101999 | 1459233188 | Python | Python | py | Runtime Error | 0 | 0 | 316 |
import sys
while True:
x = input()
num, ans = [], []
if x == 0: break
else:
for j in xrange(x):
num.append(input())
for j in xrange(x):
if num[j] > 0:
for k in xrange(j + 1,x + 1):
# print num[j:k]
# print sum(num[j:k])
ans.append(sum(num[j:k]))
else:
pass
print max(ans) | File "/tmp/tmpt6y_rg3m/tmp81niz5qx.py", line 19
print max(ans)
^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s613737030 | p00022 | u811773570 | 1464102141 | Python | Python3 | py | Runtime Error | 0 | 0 | 179 | while True:
n = int(input())
if n==0:
break
l = []
for i in range(n):
l.append(int(input()))
for i in range(1,n):
l[i]=max()l[i-1]+l[i],l[i])
print(max(l)) | File "/tmp/tmpj1cll0l1/tmpd0t72ooz.py", line 9
l[i]=max()l[i-1]+l[i],l[i])
^
SyntaxError: unmatched ')'
| |
s085570111 | p00022 | u358919705 | 1471986160 | Python | Python3 | py | Runtime Error | 0 | 0 | 462 | while True:
n = int(input())
if n == 0:
break
a = [int(input()) for _ in range(n)]
b = []
while a != []:
for i in range(len(a) - 1):
if a[i] * a[i + 1] < 0:
b.append(sum(a[:i + 1]))
a[:i + 1] = []
break
else:
b.append(sum(a))
a = []
for i in range(1, len(b)):
if b[i - 1] > 0:
b[i] += b[i - 1]
print(max(b) | File "/tmp/tmphzeohq7g/tmp3nr8okug.py", line 19
print(max(b)
^
SyntaxError: '(' was never closed
| |
s840314685 | p00022 | u379499530 | 1473061361 | Python | Python | py | Runtime Error | 0 | 0 | 198 | while 1:
n = input()
if n == 0: break
sums = []
a, b, c = 0, 0, input()
for i in xrange(n - 1):
sums.append(a + b + c)
a, b, c = b, c, input()
print max(sums) | File "/tmp/tmpz_ambwfl/tmpkm_rxn68.py", line 9
print max(sums)
^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s529715714 | p00022 | u922871577 | 1479344262 | Python | Python | py | Runtime Error | 0 | 0 | 377 | while True:
n = input()
if n == 0:
exit()
A = [int(raw_input()) for _ in xrange(n)]
if all(a<=0 for a in A):
print max(a)
exit()
r = 0
tmp = 0
ans = 0
while r < n:
tmp += A[r]
if tmp < 0:
l = r
tmp = 0
else:
ans = max(ans, tmp)
r += 1
print ans | File "/tmp/tmppg10khwl/tmpr0bq6kp0.py", line 7
print max(a)
^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s158992008 | p00022 | u776559258 | 1481164962 | Python | Python3 | py | Runtime Error | 0 | 0 | 113 | while True:
try:
n=int(input())
a=[int(input()) for i in range(n)]
print(max(a))
except EOFError:
break | ||
s732525671 | p00022 | u898097781 | 1482162575 | Python | Python | py | Runtime Error | 0 | 0 | 167 | while 1:
n = int(raw_input())
max = 0
for i in range(n):
tmax = max + int(raw_input())
if tmax > max:
max = tmax
print tmax | File "/tmp/tmpywn6y1wp/tmp1x_kr843.py", line 8
print tmax
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s214801042 | p00022 | u032662562 | 1486283863 | Python | Python3 | py | Runtime Error | 0 | 0 | 494 | def solve(v):
w = []
sig=sign(v[0])
x = v[0]
for i in range(1,len(v)):
if v[i] * sig >= 0:
x += v[i]
else:
w.append(x)
sig=sign(v[i])
x=v[i]
w.append(x)
# print(w)
return(solve0(w))
if __name__ == "__main__":
while True:
n = int(input())
if n == 0:
break
v = []
for i in range(n):
v.append(int(input()))
print(solve(v)) | Traceback (most recent call last):
File "/tmp/tmpldfzsbd9/tmp7tlqn35e.py", line 18, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s644598770 | p00022 | u462831976 | 1492722364 | Python | Python3 | py | Runtime Error | 0 | 0 | 513 | # -*- coding: utf-8 -*-
import sys
import os
import math
N = int(input())
for i in range(N):
ax, ay, ar, bx, by, br = map(float, input().split())
between_center = math.hypot(ax - bx, ay - by)
# ????????£????????????
if between_center > ar + br:
print(0)
# ????????????????????¨
else:
# B in A
if ar > between_center + br:
print(2)
# A in B
elif br > between_center + ar:
print(-2)
else:
print(1) | Traceback (most recent call last):
File "/tmp/tmpuazqd9ru/tmplk0ylrhz.py", line 7, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s649904992 | p00022 | u462831976 | 1492722435 | Python | Python3 | py | Runtime Error | 0 | 0 | 514 | # -*- coding: utf-8 -*-
import sys
import os
import math
N = int(input())
for i in range(N):
ax, ay, ar, bx, by, br = map(float, input().split())
between_center = math.hypot(ax - bx, ay - by)
# ????????£????????????
if between_center > ar + br:
print(0)
# ????????????????????¨
else:
# B in A
if ar > between_center + br:
print(2)
# A in B
elif br > between_center + ar:
print(-2)
else:
print(1) | Traceback (most recent call last):
File "/tmp/tmpjhods_sb/tmpfotg6ojc.py", line 8, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s082224448 | p00022 | u856705970 | 1495451772 | Python | Python | py | Runtime Error | 0 | 0 | 667 | while True:
n = int(raw_input())
if n == 0:
break
a = (int(raw_input()) for _ in xrange(n))
b = []
c = 0
for ai in a:
if ai == 0:
continue
if (c > 0 and ai < 0) or (c < 0 and ai > 0):
b.append(c)
c = 0
c += ai
if c != 0:
b.append(c)
l = len(b)
i = 0 if b[0] > 0 else 1
s = b[i]
ans = s
j = i + 2
while j < l:
s += b[j - 1] + b[j]
while i < j:
ns = s - b[i] - b[i + 1]
if ns < s:
break
s = ns
i += 2
ans = max(s, ans)
j += 2
print(ans) | Traceback (most recent call last):
File "/tmp/tmpyvvdgkoe/tmpeyy1d3jk.py", line 2, in <module>
n = int(raw_input())
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s662902912 | p00022 | u856705970 | 1495451872 | Python | Python | py | Runtime Error | 0 | 0 | 667 | while True:
n = int(raw_input())
if n == 0:
break
a = (int(raw_input()) for _ in xrange(n))
b = []
c = 0
for ai in a:
if ai == 0:
continue
if (c > 0 and ai < 0) or (c < 0 and ai > 0):
b.append(c)
c = 0
c += ai
if c != 0:
b.append(c)
l = len(b)
i = 0 if b[0] > 0 else 1
s = b[i]
ans = s
j = i + 2
while j < l:
s += b[j - 1] + b[j]
while i < j:
ns = s - b[i] - b[i + 1]
if ns < s:
break
s = ns
i += 2
ans = max(s, ans)
j += 2
print(ans) | Traceback (most recent call last):
File "/tmp/tmpus2sbspu/tmpgt79iibi.py", line 2, in <module>
n = int(raw_input())
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s842934391 | p00022 | u371539389 | 1495679917 | Python | Python3 | py | Runtime Error | 0 | 0 | 389 | import sys
while True:
n=int(input())
if n==0:
sys.exit()
sum_list=[0]
for i in range(n):
sum_list.append(sum_list[-1]+int(input()))
if max(sum_list)==0:
sum_list.pop(0)
print(max(sum_list))
maximum=0
for i in range(n):
for j in range(i,n+1):
maximum=max(sum_list[j]-sum_list[i],maximum)
print(maximum) | Traceback (most recent call last):
File "/tmp/tmpwslsucuh/tmpfjkp701e.py", line 3, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s783531027 | p00022 | u371539389 | 1495679995 | Python | Python3 | py | Runtime Error | 0 | 0 | 389 | import sys
while True:
n=int(input())
if n==0:
sys.exit()
sum_list=[0]
for i in range(n):
sum_list.append(sum_list[-1]+int(input()))
if max(sum_list)==0:
sum_list.pop(0)
print(max(sum_list))
maximum=0
for i in range(n):
for j in range(i,n+1):
maximum=max(sum_list[j]-sum_list[i],maximum)
print(maximum) | Traceback (most recent call last):
File "/tmp/tmpkubu9ju8/tmp24eerotv.py", line 3, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s851651029 | p00022 | u371539389 | 1495680056 | Python | Python3 | py | Runtime Error | 0 | 0 | 360 | n=int(input())
while n!=0:
sum_list=[0]
for i in range(n):
sum_list.append(sum_list[-1]+int(input()))
if max(sum_list)==0:
sum_list.pop(0)
print(max(sum_list))
maximum=0
for i in range(n):
for j in range(i,n+1):
maximum=max(sum_list[j]-sum_list[i],maximum)
print(maximum)
n=int(input()) | Traceback (most recent call last):
File "/tmp/tmpqyie29gb/tmpskl17asw.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s811401932 | p00022 | u584777171 | 1503678687 | Python | Python3 | py | Runtime Error | 0 | 0 | 415 | a = []
b = []
def searchs(i, n, m):
b.clear()
for k in range(i+1, n+1):
b.append(sum(a[i:k]))
# print(b)
if m < max(b):
m = max(b)
if i+1 < n:
m = searchs(i+1, n, m)
return m
while True:
user = input()
n = int(user)
if n == 0:
break
a.clear()
for i in range(n):
a.append(int(input()))
# print(a)
print(searchs(0, n, 0)) | Traceback (most recent call last):
File "/tmp/tmp1hocjmg3/tmpd_eaiv9q.py", line 18, in <module>
user = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s455784216 | p00022 | u584777171 | 1503818621 | Python | Python3 | py | Runtime Error | 0 | 0 | 435 | a = []
b = []
def searchs(i, n, m):
if b != []:
b.clear()
for k in range(i+1, n+1):
b.append(sum(a[i:k]))
# print(b)
if m < max(b):
m = max(b)
if i+1 < n:
m = searchs(i+1, n, m)
return m
while True:
user = input()
n = int(user)
if n == 0:
break
a.clear()
for i in range(n):
a.append(int(input()))
# print(a)
print(searchs(0, n, 0)) | Traceback (most recent call last):
File "/tmp/tmpprq5kmwz/tmpowvu4vlm.py", line 19, in <module>
user = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s186624905 | p00022 | u584777171 | 1503818899 | Python | Python3 | py | Runtime Error | 0 | 0 | 464 | a = []
b = []
def searchs(i, n, m):
if b != []:
b.clear()
if a != []:
for k in range(i+1, n+1):
b.append(sum(a[i:k]))
if m < max(b):
m = max(b)
if i+1 < n:
m = searchs(i+1, n, m)
return m
while True:
user = input()
n = int(user)
if n == 0:
break
if a != []:
a.clear()
for i in range(n):
a.append(int(input()))
# print(a)
print(searchs(0, n, 0)) | Traceback (most recent call last):
File "/tmp/tmp1m9ugw6c/tmp9evr91hc.py", line 19, in <module>
user = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s638202527 | p00022 | u072398496 | 1507776631 | Python | Python | py | Runtime Error | 0 | 0 | 172 | while 1:
n = input()
a = []
for i in range(n):
k = input()
a.append(k)
if len(a) > 0:
print max([sum(a[i:(j+1)]) for i in range(7) for j in range(i,7)]) | File "/tmp/tmp5fpi2dbr/tmpmeihqjch.py", line 8
print max([sum(a[i:(j+1)]) for i in range(7) for j in range(i,7)])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s837490585 | p00022 | u928329738 | 1511838042 | Python | Python3 | py | Runtime Error | 0 | 0 | 104 | while int(input()) != 0:
sum=0
for i in range(n):
sum=sum+int(input())
print sum | File "/tmp/tmp_jirjaoj/tmpnb_3_84v.py", line 5
print sum
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s918833638 | p00022 | u205327055 | 1513225257 | Python | Python | py | Runtime Error | 0 | 0 | 268 | # coding: utf-8
# Your code here!
n=int(input())
while n!=0:
for i in range(n):
list[i]=int(input())
a=0
b=0
for i in range(n):
for j in range(n-i):
a+=list[i+j]
if b<a:
b=a
print a
n=int(input()) | File "/tmp/tmpty9dgo1s/tmps0hh7la2.py", line 14
print a
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s695595799 | p00022 | u205327055 | 1513225263 | Python | Python | py | Runtime Error | 0 | 0 | 269 | # coding: utf-8
# Your code here!
n=int(input())
while n!=0:
for i in range(n):
list[i]=int(input())
a=0
b=0
for i in range(n):
for j in range(n-i):
a+=list[i+j]
if b<a:
b=a
print a
n=int(input()), | File "/tmp/tmp_ikceiz3/tmpu81coe17.py", line 14
print a
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s178393161 | p00022 | u205327055 | 1513225564 | Python | Python | py | Runtime Error | 0 | 0 | 273 | # coding: utf-8
# Your code here!
n=int(input())
while n!=0:
for i in range(n):
list.append(int(input()))
a=0
b=0
for i in range(n):
for j in range(n-i):
a+=list[i+j]
if b<a:
b=a
print a
n=int(input()) | File "/tmp/tmpah86qlq1/tmpvtozp6c1.py", line 14
print a
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s535236848 | p00022 | u205327055 | 1513225591 | Python | Python | py | Runtime Error | 0 | 0 | 281 | # coding: utf-8
# Your code here!
n=int(raw_input())
while n!=0:
for i in range(n):
list.append(int(raw_input()))
a=0
b=0
for i in range(n):
for j in range(n-i):
a+=list[i+j]
if b<a:
b=a
print a
n=int(input()) | File "/tmp/tmp24aycxln/tmptaq6v0x2.py", line 14
print a
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s952561968 | p00022 | u724548524 | 1525842471 | Python | Python3 | py | Runtime Error | 0 | 0 | 397 | while True:
n = int(input())
if n == 0:
break
a = [int(input()) for _ in range(n)]
d = [a[0]]
for i in range(1, n):
if a[i] / d[-1] >= 0:
d[-1] += a[i]
else:
d.append(a[i])
for i in range(2, len(d)):
if d[i - 1] < 0 and d[i -2] > d[i - 1] and d[i] > d[i - 1]:
d[i] += d[i -2] + d[i -1]
print(max(d))
| Traceback (most recent call last):
File "/tmp/tmp_jdkk_u9/tmp6f3u6b0m.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s714445896 | p00022 | u724548524 | 1525842571 | Python | Python3 | py | Runtime Error | 0 | 0 | 440 | while True:
n = int(input())
if n == 0:
break
a = [int(input()) for _ in range(n)]
d = [a[0]]
for i in range(n):
if d[0] == 0:
d[0] += a[i]
if a[i] / d[-1] >= 0:
d[-1] += a[i]
else:
d.append(a[i])
for i in range(2, len(d)):
if d[i - 1] < 0 and d[i -2] > d[i - 1] and d[i] > d[i - 1]:
d[i] += d[i -2] + d[i -1]
print(max(d))
| Traceback (most recent call last):
File "/tmp/tmp2k4oui90/tmp7x23h10b.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s215023619 | p00022 | u724548524 | 1525843799 | Python | Python3 | py | Runtime Error | 0 | 0 | 623 | while True:
n = int(input())
if n == 0:
break
a = [int(input()) for _ in range(n)]
d = [a[0]]
for i in range(n):
if d[0] == 0:
d[0] += a[i]
elif a[i] / d[-1] >= 0:
d[-1] += a[i]
else:
d.append(a[i])
if d[0] < 0:
d.pop(0)
print(d)
if len(d) <= 2:
print(max(d))
else:
maxd = max(d)
for i in range(0, len(d), 2):
for j in range(i + 1, len(d) + 1, 2):
print("{} {} {}".format(i, j, sum(d[i:j])))
maxd = max(maxd, sum(d[i:j]))
print(maxd)
| Traceback (most recent call last):
File "/tmp/tmpg16d3a_a/tmp13uco3hv.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s716384175 | p00022 | u724548524 | 1525843915 | Python | Python3 | py | Runtime Error | 0 | 0 | 587 | while True:
n = int(input())
if n == 0:
break
a = [int(input()) for _ in range(n)]
d = [a[0]]
for i in range(n):
if d[0] == 0:
d[0] += a[i]
elif a[i] / d[-1] >= 0:
d[-1] += a[i]
else:
d.append(a[i])
if d[0] < 0:
d.pop(0)
if d == []:
print(max(a))
if len(d) <= 2:
print(max(d))
else:
maxd = max(d)
for i in range(0, len(d), 2):
for j in range(i + 1, len(d) + 1, 2):
maxd = max(maxd, sum(d[i:j]))
print(maxd)
| Traceback (most recent call last):
File "/tmp/tmpgnh02sxb/tmpt0519sax.py", line 2, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s131246509 | p00022 | u724548524 | 1525844037 | Python | Python3 | py | Runtime Error | 0 | 0 | 582 | while True:
n = int(input())
if n == 0:
break
a = [int(input()) for _ in range(n)]
d = [a[0]]
for i in range(n):
if d[0] == 0:
d[0] += a[i]
elif a[i] / d[-1] >= 0:
d[-1] += a[i]
else:
d.append(a[i])
if len(d) <= 2:
print(max(max(d), max(a))
else:
if d[0] < 0:
d.pop(0)
maxd = max(d)
for i in range(0, len(d), 2):
for j in range(i + 1, len(d) + 1, 2):
maxd = max(maxd, sum(d[i:j]))
print(maxd)
| File "/tmp/tmp0y06b4io/tmpsxkhcvwj.py", line 16
print(max(max(d), max(a))
^
SyntaxError: '(' was never closed
| |
s370874071 | p00022 | u724548524 | 1527245692 | Python | Python3 | py | Runtime Error | 0 | 0 | 628 | from collections import deque
while True:
n = int(input())
if n == 0:break
a = [int(input()) for _ in range(n)]
b = deque([0] * n)
j = 0
for i in range(n):
if a[i] * b[j] >= 0:b[j] += a[i]
else:j += 1;b[j] += a[i]
if b[0] < 0:b.popleft()
while b[-1] <= 0:b.pop()
m = len(b) // 2 + 1
v = [[0] * m for _ in range(m)]
v[0][0] = b[0]
for i in range(1, m):
v[0][i] = v[0][i - 1] + b[2 * i] + b[2 * i - 1]
for i in range(1, m):
for j in range(i, m):
v[i][j] = v[i - 1][j] - b[2 * i - 2] - b[2 * i - 1]
print(max([max(i) for i in v]))
| Traceback (most recent call last):
File "/tmp/tmpxtxfkbew/tmp9hvy660m.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s196866987 | p00022 | u724548524 | 1527245799 | Python | Python3 | py | Runtime Error | 0 | 0 | 643 | from collections import deque
while True:
n = int(input())
if n == 0:break
a = [int(input()) for _ in range(n)]
b = deque([0] * n)
j = 0
for i in range(n):
if a[i] * b[j] >= 0:b[j] += a[i]
else:j += 1;b[j] += a[i]
if b[0] < 0:b.popleft()
while b[-1] <= 0 and len(b) > 1:b.pop()
m = len(b) // 2 + 1
v = [[0] * m for _ in range(m)]
v[0][0] = b[0]
for i in range(1, m):
v[0][i] = v[0][i - 1] + b[2 * i] + b[2 * i - 1]
for i in range(1, m):
for j in range(i, m):
v[i][j] = v[i - 1][j] - b[2 * i - 2] - b[2 * i - 1]
print(max([max(i) for i in v]))
| Traceback (most recent call last):
File "/tmp/tmpnarn9llt/tmpv0x3cex2.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s955233371 | p00022 | u419407022 | 1356116859 | Python | Python | py | Runtime Error | 0 | 23000 | 387 | def inc(x):
return x+1
while True:
n = int(raw_input())
if n == 0:
break
numbers = [int(raw_input()) for i in range(n)]
pointers = filter(lambda x:x[0]<x[1], map(lambda x:(x/n,x%n+1),xrange(n*n)))
ans = 0
for pointer in pointers:
tmp = reduce(lambda x,y:x+y,numbers[pointer[0],pointer[1]])
ans = tmp > ans if tmp else ans
print ans | File "/tmp/tmppvtnrgc0/tmpwgmpwiji.py", line 13
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s201655143 | p00022 | u419407022 | 1356118175 | Python | Python | py | Runtime Error | 0 | 23000 | 325 | while True:
n = int(raw_input())
if n == 0:
break
numbers = [int(raw_input()) for i in range(n)]
if max(numbers) <= 0:
return max(numbers)
ans = 0
for i in range(n):
tmp = 0
for j in range(i,n):
tmp += numbers[j]
ans = max(ans,tmp)
print ans | File "/tmp/tmpoo_cf6tc/tmpwu9nynvm.py", line 14
print ans
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s508758618 | p00022 | u782850731 | 1362111524 | Python | Python | py | Runtime Error | 0 | 0 | 1299 | from __future__ import (absolute_import, division, print_function,
unicode_literals)
from sys import stdin
while True:
n = int(stdin.readline())
if not n:
break
tup = tuple(int(stdin.readline()) for _ in xrange(n))
L = [tup[0]]
for i in tup[1:]:
if 0 > i and 0 > L[-1]:
L[-1] += i
elif 0 <= i and 0 <= L[-1]:
L[-1] += i
else:
L.append(i)
while True:
length = len(L)
if L[0] <= 0:
L.pop(0)
continue
if L[-1] <= 0:
L.pop()
continue
if length > 1 and L[0] + L[1] <= 0:
L.pop(0)
L.pop(0)
continue
if length > 1 and L[-1] + L[-2] <= 0:
L.pop()
L.pop()
continue
if length > 2 and sum(L[:3]) >= L[2]:
L[2] = sum(L[:3])
L.pop(0)
L.pop(0)
continue
if length > 2 and sum(L[-3:]) >= L[-3]:
L[-3] = sum(L[-3:])
L.pop(0)
L.pop(0)
continue
break
m = 0
for i in xrange(len(L)):
for j in xrange(1 + i, len(L) + 1):
t = sum(L[i:j])
if t > m:
m = t
print(m) | Traceback (most recent call last):
File "/tmp/tmpnmq3atip/tmp1p8kj44o.py", line 6, in <module>
n = int(stdin.readline())
^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s272011371 | p00022 | u782850731 | 1362154617 | Python | Python | py | Runtime Error | 0 | 0 | 1034 | from __future__ import (division, absolute_import, print_function,
unicode_literals)
from sys import stdin
def grouping(nums):
it = iter(nums)
L = [next(nums)]
minus = L[0] < 0
for n in it:
if (n < 0 and minus) or (n >= 0 and not minus):
L[-1] += n
else:
L.append(n)
minus = not minus
return L
def collect(nl):
result = 0
while len(nl) > 1:
nl = grouping(nl[i] + nl[i+1] for i in xrange(0, len(nl), 2))
if nl[-1] <= 0:
nl.pop()
if not len(nl):
break
if nl[0] >= 0:
result += nl[0]
nl.pop(0)
return result
while True:
n = int(stdin.readline())
if not n:
break
L = grouping(int(stdin.readline()) for _ in xrange(n))
if L[0] <= 0:
L.pop(0)
if L[-1] <= 0:
L.pop()
val = max(L)
idx = L.index(val)
val += collect(list(reversed(L[:idx])))
val += collect(L[idx+1:])
print(val) | Traceback (most recent call last):
File "/tmp/tmpk765g7ey/tmpxdb8ydbk.py", line 31, in <module>
n = int(stdin.readline())
^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s703588998 | p00022 | u282635979 | 1363438363 | Python | Python | py | Runtime Error | 0 | 0 | 247 | while True:
n = input()
if n == 0:
break
else:
nums = []
for val in range(1,n+1):
nums.append(input())
sums = []
for val in range(0,n):
sums.append(nums[val]+nums[val+1])
sums.sort()
sums.reverse()
print sums[0]
continue | File "/tmp/tmpnz3_26uc/tmpwy30gucl.py", line 14
print sums[0]
^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s369811623 | p00022 | u282635979 | 1363438832 | Python | Python | py | Runtime Error | 0 | 0 | 271 | while True:
n = input()
if n == 0:
break
else:
nums = []
for val in range(1,n+1):
num = int(raw_input())
nums.append(num)
sums = []
for val in range(0,n-1):
sums.append(nums[val]+nums[val+1])
sums.sort()
sums.reverse()
print sums[0]
continue | File "/tmp/tmpoaq6oofu/tmppiyk29cn.py", line 15
print sums[0]
^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s777695125 | p00022 | u282635979 | 1363438999 | Python | Python | py | Runtime Error | 0 | 0 | 269 | while True:
n = input()
if n == 0:
break
else:
nums = []
for val in range(1,n+1):
num = int(raw_input())
nums.append(num)
sums = []
for val in range(1,n):
sums.append(nums[val-1]+nums[val])
sums.sort()
sums.reverse()
print sums[0]
continue | File "/tmp/tmpug0cq9c8/tmp8_mdij4z.py", line 15
print sums[0]
^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s019858246 | p00022 | u542421762 | 1368260866 | Python | Python | py | Runtime Error | 0 | 0 | 584 |
import sys
def max_sum_seq(lis):
r = []
l = len(lis)
for n in range(1, l+1):
r = r + every_slice(lis, n)
return max(map((lambda r1: reduce((lambda x, y: x + y), r1, 0)), r))
def every_slice(lis, n):
r = []
l = len(lis)
for i in range(l-n+1):
r.append(lis[i:i+n])
return r
#input_file = open(sys.argv[1], "r")
while True:
# n = int(input_file.readline())
n = int(sys.stdin.readline())
if n == 0:
break
lis = []
for i in range(n):
lis.append(int(input_file.readline()))
print max_sum_seq(lis) | File "/tmp/tmppnf57ris/tmpmzhiqopb.py", line 30
print max_sum_seq(lis)
^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s258608323 | p00022 | u633068244 | 1393384053 | Python | Python | py | Runtime Error | 0 | 0 | 433 | ----:---F1 *scratch* All L1 (Fundamental)------------------------------------------------------------------------------------
Loading subst-jis...done
while True:
n = int(raw_input())
if n == 0:
break
a=[]
for i in range(n):
a[i] = int(raw_input())
max = -1e10
for i in range(len(a)):
sum = 0
for j in range(i+1:len(a)):
sum += a[j]
if sum > max:
max = sum
print max | File "/tmp/tmpgwhhup98/tmpky2bx232.py", line 1
----:---F1 *scratch* All L1 (Fundamental)------------------------------------------------------------------------------------
^
SyntaxError: invalid syntax
| |
s152052333 | p00023 | u647694976 | 1555925161 | Python | Python3 | py | Runtime Error | 0 | 0 | 520 | while True:
N=int(input())
for i in range(N):
x1,y1,r1,x2,y2,r2=map(float,input().split())
d=((x1-x2)**2+(y1-y2)**2)**0.5
if r1-r2>d:
if r1==r2+d:
print("1")
else:
print("2")
elif r2-r1>d:
if r2==r1+d:
print("1")
else:
print("-2")
elif d<r1+r2:
print("1")
elif r1+r2==d:
print("1")
elif d>r1+r2:
print("0")
| Traceback (most recent call last):
File "/tmp/tmp36m2wpez/tmpnr26roil.py", line 2, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s397588582 | p00023 | u894114233 | 1461819051 | Python | Python | py | Runtime Error | 0 | 0 | 254 | n=input()
for i in xrange(n):
xa,ya,ra,xb,yb,rb=map(int,raw_input().split())
d=(xa-xb)**2+(ya-yb)**2
if d>(ra+rb)**2:
print(0)
elif ra>rb:
if (ra-rb)**2>d:
print(2)
else:
print(1)
else:
if (rb-ra)**2>d:
print(-2)
else:
print(1) | Traceback (most recent call last):
File "/tmp/tmpftrakv9e/tmpnwsxjgf8.py", line 1, in <module>
n=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s843103869 | p00023 | u898097781 | 1483303114 | Python | Python | py | Runtime Error | 0 | 0 | 301 | import math
n = int(raw_input())
for i in range(n):
xa, ya, ra, xb, yb, rb = map(float, raw_input().split(' '))
d = math.sqrt((xa-xb)**2 + (ya-yb)**2)
if d+rb <= ra:
print 2
elif: d+ra <= rb:
print -2
elif: d > ra+rb:
print 0
else:
print 1
| File "/tmp/tmp4k3rp_rj/tmp1ioon7dm.py", line 8
print 2
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s387926943 | p00023 | u582608581 | 1484259007 | Python | Python3 | py | Runtime Error | 0 | 0 | 517 | #include <stdio.h>
#include <math.h>
int main(void){
int N;
double Xa;
double Ya;
double Ra;
double Xb;
double Yb;
double Rb;
double distance;
scanf("%d",&N);
while(N--){
scanf("%lf%lf%lf%lf%lf%lf",&Xa,&Ya,&Ra,&Xb,&Yb,&Rb);
distance = sqrt(pow(Xa - Xb,2.0) + pow(Ya - Yb,2.0));
if(distance + Rb - Ra <= 10E-14){
printf("2\n");
} else if(distance + Ra - Rb <= 10E-14){
printf("-2\n");
} else if(distance - Ra - Rb <= 10E-14){
printf("1\n");
} else{
printf("0\n");
}
}
return 0;
} | File "/tmp/tmphuryde67/tmpta_kojem.py", line 4
int main(void){
^^^^
SyntaxError: invalid syntax
| |
s116208847 | p00023 | u618637847 | 1494902275 | Python | Python3 | py | Runtime Error | 0 | 0 | 319 |
import math
num = int(input())
for i in range(num):
ax,ay,ar,bx,by,br = map(float,input().split(' '))
d = (ax - bx)*(ax - bx) + (ay * by)
if d < abs(br - ar):
if ar > br:
print(2)
else:
print(-2)
elif d <= r1 + r2:
print(1)
else:
print(0) | Traceback (most recent call last):
File "/tmp/tmpikg9gb5d/tmpg_jt1xix.py", line 6, in <module>
num = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s650111539 | p00023 | u618637847 | 1494902376 | Python | Python3 | py | Runtime Error | 0 | 0 | 328 |
import math
num = int(input())
for i in range(num):
ax,ay,ar,bx,by,br = map(float,input().split(' '))
d = (ax - bx)*(ax - bx) + (ay * by)(ay * by)
if d < abs(br - ar):
if ar > br:
print(2)
else:
print(-2)
elif d <= ar + br:
print(1)
else:
print(0) | Traceback (most recent call last):
File "/tmp/tmp64tu26cp/tmpepw7dyil.py", line 6, in <module>
num = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s737825609 | p00023 | u957840591 | 1497914231 | Python | Python3 | py | Runtime Error | 0 | 0 | 515 | from numpy import *
N=int(input())
x_a=[0]*N
y_a=[0]*N
r_a=[0]*N
x_b=[0]*N
y_b=[0]*N
r_b=[0]*N
for i in range(N):
x_a[i],y_a[i],r_a[i],x_b[i],y_b[i],r_b[i]=map(float,input().split())
for i in range(N):
a=array([x_a[i]-x_b[i],y_a[i]-y_b[i]])
AB=linalg.norm(a)
r_diff=abs(r_a[i]-r_b[i])
if AB > r_a[i]+r_b[i]:
print(0)
elif r_a[i]+r_b[i] >= AB and AB >= r_diff:
print(1)
elif r_diff > AB:
if r_a[i] > r_b[i]:
print(2)
else:
print(-2) | Traceback (most recent call last):
File "/tmp/tmpu6hrbrq5/tmparw79zbu.py", line 2, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s517064495 | p00023 | u957840591 | 1497914375 | Python | Python3 | py | Runtime Error | 0 | 0 | 503 | from numpy import *
N=int(input())
x_a=[0]*N
y_a=[0]*N
r_a=[0]*N
x_b=[0]*N
y_b=[0]*N
r_b=[0]*N
for i in range(N):
x_a[i],y_a[i],r_a[i],x_b[i],y_b[i],r_b[i]=map(float,input().split())
for i in range(N):
a=array([x_a[i]-x_b[i],y_a[i]-y_b[i]])
AB=linalg.norm(a)
r_diff=abs(r_a[i]-r_b[i])
if AB > r_a[i]+r_b[i]:
print(0)
elif r_a[i]+r_b[i] >= AB and AB >= r_diff:
print(1)
else:
if r_a[i] > r_b[i]:
print(2)
else:
print(-2) | Traceback (most recent call last):
File "/tmp/tmp_v3kyw32/tmpjgn4mlha.py", line 2, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s730074865 | p00023 | u282635979 | 1363520467 | Python | Python | py | Runtime Error | 0 | 0 | 289 | import math
N = input()
for val in range(1,N+1):
x = map(float,raw_input().split(' '))
d = math.sqrt((x[0]-x[3])**2 - (x[1]-x[4])**2)
s = x[2]+x[5]
r = math.fabs(x[2]-x[5])
if r >= d:
if x[2] > x[5]:
print '2'
else:
print '-2'
elif s < d:
print '0'
else:
print '1' | File "/tmp/tmpzjgzrst7/tmplqmrmfxj.py", line 10
print '2'
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s387296557 | p00023 | u282635979 | 1363520619 | Python | Python | py | Runtime Error | 0 | 0 | 285 | import math
N = input()
for val in range(1,N+1):
x = map(float,raw_input().split(' '))
d = math.sqrt((x[0]-x[3])**2 - (x[1]-x[4])**2)
s = x[2]+x[5]
r = math.fabs(x[2]-x[5])
if r >= d:
if x[2] > x[5]:
print '2'
else:
print '-2'
elif s < d:
print '0'
else:
print '1' | File "/tmp/tmpipre45yg/tmpku5_i7uc.py", line 10
print '2'
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s063212164 | p00023 | u282635979 | 1363520840 | Python | Python | py | Runtime Error | 0 | 0 | 361 | import math
N = input()
answers = []
for val in range(1,N+1):
x = map(float,raw_input().split(' '))
d = math.sqrt((x[0]-x[3])**2 - (x[1]-x[4])**2)
s = x[2]+x[5]
r = math.fabs(x[2]-x[5])
if r >= d:
if x[2] > x[5]:
answers.append(2)
else:
answers.append(-2)
elif s < d:
answers.append(0)
else:
answers.append(1)
for val in answers:
print val | File "/tmp/tmpheln5mjx/tmpnj6ceifj.py", line 19
print val
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s834183125 | p00023 | u282635979 | 1363521081 | Python | Python | py | Runtime Error | 0 | 0 | 361 | import Math
N = input()
answers = []
for val in range(1,N+1):
x = map(float,raw_input().split(' '))
d = Math.sqrt((x[0]-x[3])**2 - (x[1]-x[4])**2)
s = x[2]+x[5]
r = Math.fabs(x[2]-x[5])
if r >= d:
if x[2] > x[5]:
answers.append(2)
else:
answers.append(-2)
elif s < d:
answers.append(0)
else:
answers.append(1)
for val in answers:
print val | File "/tmp/tmpn8t6shz7/tmpi9b4dkun.py", line 19
print val
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s323930795 | p00023 | u282635979 | 1363521107 | Python | Python | py | Runtime Error | 0 | 0 | 361 | import math
N = input()
answers = []
for val in range(1,N+1):
x = map(float,raw_input().split(' '))
d = Math.sqrt((x[0]-x[3])**2 - (x[1]-x[4])**2)
s = x[2]+x[5]
r = Math.fabs(x[2]-x[5])
if r >= d:
if x[2] > x[5]:
answers.append(2)
else:
answers.append(-2)
elif s < d:
answers.append(0)
else:
answers.append(1)
for val in answers:
print val | File "/tmp/tmp2wg_4c9q/tmpv_3jdk17.py", line 19
print val
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s186816620 | p00023 | u282635979 | 1363521171 | Python | Python | py | Runtime Error | 0 | 0 | 367 | import math
N = input()
answers = []
for val in range(1,N+1):
x = map(float,raw_input().split(' '))
d = math.fabs(sqrt((x[0]-x[3])**2 - (x[1]-x[4])**2))
s = x[2]+x[5]
r = math.fabs(x[2]-x[5])
if r >= d:
if x[2] > x[5]:
answers.append(2)
else:
answers.append(-2)
elif s < d:
answers.append(0)
else:
answers.append(1)
for val in answers:
print val | File "/tmp/tmpe_w38g_x/tmp4sjwt8o2.py", line 19
print val
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s640598180 | p00023 | u282635979 | 1363521277 | Python | Python | py | Runtime Error | 0 | 0 | 372 | import math
N = input()
answers = []
for val in range(1,N+1):
x = map(float,raw_input().split(' '))
d = math.fabs(math.sqrt((x[0]-x[3])**2 - (x[1]-x[4])**2))
s = x[2]+x[5]
r = math.fabs(x[2]-x[5])
if r >= d:
if x[2] > x[5]:
answers.append(2)
else:
answers.append(-2)
elif s < d:
answers.append(0)
else:
answers.append(1)
for val in answers:
print val | File "/tmp/tmp3aztmv0j/tmpcq_mkjn3.py", line 19
print val
^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s726539542 | p00023 | u282635979 | 1363521335 | Python | Python | py | Runtime Error | 0 | 0 | 376 | import math
N = input()
answers = []
for val in range(1,N+1):
x = map(float,raw_input().split(' '))
d = math.sqrt((x[0]-x[3])**2 - (x[1]-x[4])**2))
math.fabs(d)
s = x[2]+x[5]
r = math.fabs(x[2]-x[5])
if r >= d:
if x[2] > x[5]:
answers.append(2)
else:
answers.append(-2)
elif s < d:
answers.append(0)
else:
answers.append(1)
for val in answers:
print val | File "/tmp/tmpex8p45ak/tmpb6zfgrmh.py", line 6
d = math.sqrt((x[0]-x[3])**2 - (x[1]-x[4])**2))
^
SyntaxError: unmatched ')'
| |
s302449795 | p00023 | u542421762 | 1368261302 | Python | Python | py | Runtime Error | 0 | 0 | 774 |
import sys
import math
class Circle:
def __init__(self, x, y, r):
self.x = x
self.y = y
self.r = r
def distance(self, other):
dx = self.x - other.x
dy = self.y - other.y
return math.sqrt(dx ** 2 + dy ** 2)
def intersection(self, other):
d = self.distance(other)
if self.r > d + other.r:
return 2
elif other.r > d + self.r:
return -2
elif d =< self.r + other.r:
return 1
else:
return 0
#input_file = open(sys.argv[1], "r")
sys.stdin.readline()
for line in sys.stdin:
(xa, ya, ra, xb, yb, rb) = tuple(map(float, line.split(' ')))
ca = Circle(xa, ya, ra)
cb = Circle(xb, yb, rb)
print ca.intersection(cb) | File "/tmp/tmpyomuq5bk/tmptpvxj4j_.py", line 23
elif d =< self.r + other.r:
^
SyntaxError: invalid syntax
| |
s919636042 | p00023 | u454358619 | 1378183627 | Python | Python | py | Runtime Error | 0 | 0 | 318 | import sys
import math
n = int(raw_input())
for i in range(n):
dist = math.sqrt((yb - ya) **2 + (xb - xa) **2)
if dist > (ra + rb):
return 0
elif abs(ra - rb) <= dist <= (ra + rb):
return 1
elif dist < abs(ra - rb):
if ra > rb:
return 2
else:
return -2 | File "/tmp/tmpqvc7n10j/tmpw4f13tex.py", line 12
if ra > rb:
TabError: inconsistent use of tabs and spaces in indentation
| |
s336222731 | p00023 | u454358619 | 1378183779 | Python | Python | py | Runtime Error | 0 | 0 | 373 | import sys
import math
n = int(raw_input())
for i in range(n):
xa,ya,ra,xb,ya,rb = map(float,raw_input().split())
dist = math.sqrt((yb - ya) **2 + (xb - xa) **2)
if dist > (ra + rb):
return 0
elif abs(ra - rb) <= dist <= (ra + rb):
return 1
elif dist < abs(ra - rb):
if ra > rb:
return 2
else:
return -2 | File "/tmp/tmp54_uy7vc/tmpjgt3od8r.py", line 13
if ra > rb:
TabError: inconsistent use of tabs and spaces in indentation
| |
s822044398 | p00023 | u703161091 | 1400123215 | Python | Python3 | py | Runtime Error | 0 | 0 | 118 | # your code goes here
a, b = input().split(" ")
print ("%d %d %.5f" % (int(a)/int(b), int(a)%int(b), float(a)/int(b))) | Traceback (most recent call last):
File "/tmp/tmpn8p4g6j5/tmpkufz45ib.py", line 2, in <module>
a, b = input().split(" ")
^^^^^^^
EOFError: EOF when reading a line
| |
s738716587 | p00024 | u647694976 | 1555926244 | Python | Python3 | py | Runtime Error | 0 | 0 | 167 | while True:
flag=0
v=float(input())
t=v/9.8
y=4.9*t**2
N=0
while y>5*(N-1):
N +=1
print(N)
flag +=1
if flag==50:break
| Traceback (most recent call last):
File "/tmp/tmp30hq8nn7/tmppts79s7z.py", line 3, in <module>
v=float(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s749746052 | p00024 | u661290476 | 1482231376 | Python | Python3 | py | Runtime Error | 0 | 0 | 111 | v=int(input())
f=2
g=9.8
while True:
F=f*5-5
if sqrt(2*g*F)>=v:
print(f)
break
f+=1 | Traceback (most recent call last):
File "/tmp/tmp9szji_n3/tmpyi9bqrip.py", line 1, in <module>
v=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s215312845 | p00024 | u661290476 | 1482231408 | Python | Python3 | py | Runtime Error | 0 | 0 | 133 | from math import sqrt
v=int(input())
f=2
g=9.8
while True:
F=f*5-5
if sqrt(2*g*F)>=v:
print(f)
break
f+=1 | Traceback (most recent call last):
File "/tmp/tmpx4c_cqvp/tmpvuxkrl4c.py", line 2, in <module>
v=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s587225461 | p00024 | u898097781 | 1483303710 | Python | Python | py | Runtime Error | 0 | 0 | 203 | import math
while(1):
thv = float(raw_input())
for i in range(1, 20):
y = 5 * (i-1)
t = math.sqrt(y/4.9)
v = 9.8 * t
if v >= thv:
print i
| File "/tmp/tmptlewrfw1/tmpmg8_hoc5.py", line 10
print i
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s623449875 | p00024 | u898097781 | 1483303737 | Python | Python | py | Runtime Error | 0 | 0 | 221 | import math
while(1):
thv = float(raw_input())
for i in range(1, 20):
y = 5 * (i-1)
t = math.sqrt(y/4.9)
v = 9.8 * t
if v >= thv:
print i
break
| File "/tmp/tmpsgtv0w81/tmp4vbkxj2h.py", line 10
print i
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s400435948 | p00024 | u905313459 | 1496465409 | Python | Python3 | py | Runtime Error | 0 | 0 | 81 | import math, sys
for i in sys.stdin:
print(math.ceil(float(input())**2/98+1)) | ||
s752823176 | p00024 | u236679854 | 1512513746 | Python | Python3 | py | Runtime Error | 0 | 0 | 127 | from math import ceil
while True:
v = input()
if not v:
break
v = float(v)
print(ceil(v * v / 98 + 1)) | Traceback (most recent call last):
File "/tmp/tmpvyxm62j5/tmpy54f2au5.py", line 4, in <module>
v = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s876438706 | p00024 | u150984829 | 1516987777 | Python | Python3 | py | Runtime Error | 0 | 0 | 70 | import math,sys
for e in sys.stdin:print(int(float(input())**2/98+2))
| ||
s649584307 | p00024 | u136916346 | 1527390121 | Python | Python3 | py | Runtime Error | 0 | 0 | 93 | import math
[print(i) for i in [math.ceil(((4.9*(a/9.8)**2)+5)/5) for a in float(input())]]
| Traceback (most recent call last):
File "/tmp/tmpnmauhh6k/tmpr41i8kcx.py", line 2, in <module>
[print(i) for i in [math.ceil(((4.9*(a/9.8)**2)+5)/5) for a in float(input())]]
^^^^^^^
EOFError: EOF when reading a line
| |
s282905525 | p00024 | u282635979 | 1363618947 | Python | Python | py | Runtime Error | 0 | 0 | 151 | vs = []
while True:
v = raw_input()
if v == '':
break
else:
vs.append(v)
continue
for v in vs:
y = (float(v))**2 / 19.6
print int(y/5 + 2) | File "/tmp/tmpvo9cx6d6/tmpwr35vgy4.py", line 11
print int(y/5 + 2)
^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s215578377 | p00024 | u282635979 | 1363944985 | Python | Python | py | Runtime Error | 0 | 0 | 102 | while True:
try:
v = raw_input()
y = (float(v))**2 / 19.6
print int(y/5 + 2)
except: break | File "/tmp/tmpsl09na8e/tmpcgqvcvmp.py", line 4
y = (float(v))**2 / 19.6
IndentationError: unexpected indent
| |
s609442893 | p00024 | u865312527 | 1369151356 | Python | Python | py | Runtime Error | 0 | 0 | 276 | #!/usr/bin/env python
while 1:
n=int(raw_input())
if n==0: break
h1=map(int, raw_input().split())
for h in h1:
h2=[ x for x in h1 if x!=h ]
g=[ h2[i+1]-h2[i] for i in range(n-1) ]
if len(set(g))==1:
print h
break | File "/tmp/tmp1l3by8u_/tmp7mi54c9q.py", line 10
print h
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s319133460 | p00024 | u350508326 | 1372457502 | Python | Python | py | Runtime Error | 0 | 0 | 1101 | import math
while True:
try:
g = 9.8
l = 4.9
v = float(raw_input())
t = v/g
y = l*t*t
n = y/5 + 1
print int(math.ceil(n))
except EOFError:
break
~
~
~
~ | File "/tmp/tmpk8_9m4tg/tmpkr7qrzp9.py", line 17
print int(math.ceil(n))
^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.