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
s602265058
p04029
u555962250
1542765319
Python
Python (3.4.3)
py
Runtime Error
17
2940
43
N = int(input()) print(int(N * (N + 1) / 2)
File "/tmp/tmpsa20yxhr/tmpe1osfkco.py", line 2 print(int(N * (N + 1) / 2) ^ SyntaxError: '(' was never closed
s814938952
p04029
u733321071
1540751059
Python
Python (3.4.3)
py
Runtime Error
17
2940
34
n = int(input)) print((n + 1)*n/2)
File "/tmp/tmpd68l3mcg/tmpunlmsls_.py", line 1 n = int(input)) ^ SyntaxError: unmatched ')'
s744376032
p04029
u923279197
1540160239
Python
Python (3.4.3)
py
Runtime Error
17
2940
39
print(int(input())*(int(input())+1)//2)
Traceback (most recent call last): File "/tmp/tmp7hg03l5u/tmp34b9wmpv.py", line 1, in <module> print(int(input())*(int(input())+1)//2) ^^^^^^^ EOFError: EOF when reading a line
s236499749
p04029
u131405882
1540070257
Python
Python (3.4.3)
py
Runtime Error
18
2940
40
N = input() sum = N*(N+1)/2 print(sum)
Traceback (most recent call last): File "/tmp/tmp1w1i61_0/tmpjh0donut.py", line 1, in <module> N = input() ^^^^^^^ EOFError: EOF when reading a line
s644443299
p04029
u474270503
1538774523
Python
Python (3.4.3)
py
Runtime Error
17
2940
28
N=input() print(N*(N+1)//2)
Traceback (most recent call last): File "/tmp/tmpinotsab9/tmpn02jjtlo.py", line 1, in <module> N=input() ^^^^^^^ EOFError: EOF when reading a line
s079847137
p04029
u353919145
1538084234
Python
Python (3.4.3)
py
Runtime Error
16
2940
224
import math int i i=input() sum=(1+n)*n/2 if i!=1: print(sum) print("The sum of the integers from 1 to"+i+" is"+sum+".") else: print(sum) print("Only one child. The answer is 1 in this case.")
File "/tmp/tmpx9ab7ncx/tmp1_nm4wbs.py", line 2 int i ^ SyntaxError: invalid syntax
s936713777
p04029
u353919145
1538084153
Python
Python (3.4.3)
py
Runtime Error
17
2940
221
import math int i i=input() sum=(1+n)*n/2 if i!=1: print(sum) print("The sum of the integers from 1 to"+i+" is"+sum .) else: print(sum) print("Only one child. The answer is 1 in this case.)
File "/tmp/tmpdqwmkvhw/tmpgbmezlt7.py", line 10 print("Only one child. The answer is 1 in this case.) ^ SyntaxError: unterminated string literal (detected at line 10)
s062939891
p04029
u379702654
1537047693
Python
Python (3.4.3)
py
Runtime Error
17
2940
64
def solve(n): return sum([1..n]) print(solve(int(input())))
Traceback (most recent call last): File "/tmp/tmp2z46gvms/tmp9n086ot3.py", line 4, in <module> print(solve(int(input()))) ^^^^^^^ EOFError: EOF when reading a line
s186314883
p04029
u394482932
1536249534
Python
PyPy3 (2.4.0)
py
Runtime Error
170
38640
31
n=int(input());print(n(n+1)//2)
Traceback (most recent call last): File "/tmp/tmppwbydjx6/tmpu6f5qi72.py", line 1, in <module> n=int(input());print(n(n+1)//2) ^^^^^^^ EOFError: EOF when reading a line
s385856782
p04029
u005260772
1533932388
Python
Python (2.7.6)
py
Runtime Error
11
2568
41
print sum(range(1, int(raw_input() + 1)))
File "/tmp/tmp5zfr911b/tmp0v8sewo1.py", line 1 print sum(range(1, int(raw_input() + 1))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s047670131
p04029
u574050882
1533168519
Python
Python (3.4.3)
py
Runtime Error
17
2940
40
print(int((N=int(input())) * (N+1) /2))
File "/tmp/tmpzbv_pz6b/tmpr7754eoc.py", line 1 print(int((N=int(input())) * (N+1) /2)) ^^^^^^^^^^^^^^ SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
s368821642
p04029
u574050882
1533168377
Python
Python (3.4.3)
py
Runtime Error
17
2940
33
print((N=int(input()) * (N+1) /2)
File "/tmp/tmpfe42_b50/tmpv9pi94j7.py", line 1 print((N=int(input()) * (N+1) /2) ^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
s591423388
p04029
u004025573
1533007385
Python
Python (3.4.3)
py
Runtime Error
18
2940
33
n=int(input()) print((1+N)*N//2)
Traceback (most recent call last): File "/tmp/tmphwk9t2oa/tmpi2md9ndo.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s803616090
p04029
u931636178
1530887515
Python
Python (3.4.3)
py
Runtime Error
17
2940
71
s = int(input()) if s == 1: print(1) else: print(int((1+s)*n/2))
Traceback (most recent call last): File "/tmp/tmp728a4y_e/tmp6pw248by.py", line 1, in <module> s = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s988964245
p04029
u205561862
1528813642
Python
Python (3.4.3)
py
Runtime Error
17
2940
46
print(sum([x for i in range(int(input())+1)]))
Traceback (most recent call last): File "/tmp/tmp0iyx3e_w/tmp8tihsp0m.py", line 1, in <module> print(sum([x for i in range(int(input())+1)])) ^^^^^^^ EOFError: EOF when reading a line
s614533807
p04029
u205561862
1528812613
Python
Python (3.4.3)
py
Runtime Error
17
2940
40
print((lambda x:x* x-~/2)(int(input())))
File "/tmp/tmphr3lnmxe/tmpwi_2qwlt.py", line 1 print((lambda x:x* x-~/2)(int(input()))) ^ SyntaxError: invalid syntax
s191741744
p04029
u205561862
1528812560
Python
Python (3.4.3)
py
Runtime Error
17
2940
40
print((lambda x:x* x-~/2)(int(input())))
File "/tmp/tmpmt71wivq/tmpegaaxhli.py", line 1 print((lambda x:x* x-~/2)(int(input()))) ^ SyntaxError: invalid syntax
s996255333
p04029
u982517812
1528258730
Python
Python (3.4.3)
py
Runtime Error
17
2940
90
# 6月6日 a = int(input()) b = int(input()) c = int(input()) d = (a+b)*c//2 print(d)
Traceback (most recent call last): File "/tmp/tmpdj01op3c/tmp9gna6wcp.py", line 2, in <module> a = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s123407006
p04029
u982517812
1528258592
Python
Python (3.4.3)
py
Runtime Error
17
2940
90
# 6月6日 a = int(input()) b = int(input()) c = int(input()) d = (a+b)*c//2 print(d)
Traceback (most recent call last): File "/tmp/tmp0izg_fy3/tmpmspn0oqz.py", line 2, in <module> a = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s825350540
p04029
u573970531
1524598522
Python
Python (3.4.3)
py
Runtime Error
17
2940
87
inn = int(input()) r = 0 for i in range(1,inn+1): r += i print(r)
File "/tmp/tmpf80fs25g/tmpu_3cfhok.py", line 1 inn = int(input()) IndentationError: unexpected indent
s830461346
p04029
u127856129
1521473130
Python
Python (3.4.3)
py
Runtime Error
17
2940
63
a=int(input()) c==0 while a==0: c+=a a-=1 print(int(c))
Traceback (most recent call last): File "/tmp/tmpoj8rang8/tmp1g6grbpf.py", line 1, in <module> a=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s979944891
p04029
u127856129
1521473035
Python
Python (3.4.3)
py
Runtime Error
18
2940
58
a=int(input()) while a==0: c+=a a-=1 print(int(c))
Traceback (most recent call last): File "/tmp/tmpwyyvrnq0/tmpcn7de8o8.py", line 1, in <module> a=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s255190614
p04029
u926678805
1519925483
Python
Python (3.4.3)
py
Runtime Error
18
3064
83
# coding: utf-8 n=int(input().split()) a=0 for i in range(1,n+1): a+=i print(a)
Traceback (most recent call last): File "/tmp/tmp0emn9rh3/tmp3j1xhxdh.py", line 2, in <module> n=int(input().split()) ^^^^^^^ EOFError: EOF when reading a line
s344096035
p04029
u088543709
1518604853
Python
Python (2.7.6)
py
Runtime Error
10
2568
34
n = raw_input() print (n*(n-1)/2)
Traceback (most recent call last): File "/tmp/tmpux1ps_1l/tmpl14e83it.py", line 1, in <module> n = raw_input() ^^^^^^^^^ NameError: name 'raw_input' is not defined
s056344201
p04029
u978494963
1517270499
Python
Python (3.4.3)
py
Runtime Error
17
2940
66
n = int(input()) res= 0 if i in range(n) res += i+1 print(res)
File "/tmp/tmppz8reoei/tmpg8tjrtuo.py", line 3 if i in range(n) ^ SyntaxError: expected ':'
s138129544
p04029
u598016178
1505674503
Python
Python (3.4.3)
py
Runtime Error
17
2940
30
print((n=int(input()))*-~n>>1)
File "/tmp/tmpfi5a710z/tmpba33pn9k.py", line 1 print((n=int(input()))*-~n>>1) ^^^^^^^^^^^^^^ SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
s763318120
p04029
u598016178
1505672840
Python
Python (3.4.3)
py
Runtime Error
17
2940
100
def fact(n): if n <= 0: return 1 return n * fact(n - 1) n = input() print(fact(n))
Traceback (most recent call last): File "/tmp/tmp1em611lj/tmp232w6749.py", line 6, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s841434625
p04029
u364386647
1501254047
Python
Python (3.4.3)
py
Runtime Error
17
2940
42
N = int(input()) print(int(N * (N+1) / 2)
File "/tmp/tmpue4kpwy1/tmpoojwxn1p.py", line 2 print(int(N * (N+1) / 2) ^ SyntaxError: '(' was never closed
s512779589
p04029
u996252264
1500180645
Python
Python (3.4.3)
py
Runtime Error
17
3060
183
def ri(): return int(input()) def rli(): return list(map(int, input().split())) def rls(): return list(input()) def pli(a): return "".join(list(map(str, a))) n = ri() print(n(n+1)/2)
Traceback (most recent call last): File "/tmp/tmpfq9csocq/tmpbxnt0rni.py", line 6, in <module> n = ri() ^^^^ File "/tmp/tmpfq9csocq/tmpbxnt0rni.py", line 1, in ri def ri(): return int(input()) ^^^^^^^ EOFError: EOF when reading a line
s061652299
p04029
u502149531
1497855516
Python
Python (3.4.3)
py
Runtime Error
17
2940
65
a = int(input()) b = 1 for i in range(a) b = b * a print(b)
File "/tmp/tmp_j060h31/tmppsusqqnt.py", line 4 for i in range(a) ^ SyntaxError: expected ':'
s925535350
p04029
u559722042
1490085053
Python
Python (3.4.3)
py
Runtime Error
17
2940
27
n=input() print(n*(n+1)//2)
Traceback (most recent call last): File "/tmp/tmprrl5v6kv/tmp80_2rw2_.py", line 1, in <module> n=input() ^^^^^^^ EOFError: EOF when reading a line
s201641570
p04029
u524343822
1485228718
Python
Python (3.4.3)
py
Runtime Error
24
3064
28
a = input() print a*(a+1)/2
File "/tmp/tmpeeiin0wu/tmpjmyc2d2q.py", line 2 print a*(a+1)/2 ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s511477740
p04029
u045337404
1479513478
Python
Python (3.4.3)
py
Runtime Error
24
3064
54
N = raw_input('') x = (int(N) + 1) * int(N)/2 print(x)
Traceback (most recent call last): File "/tmp/tmpzocgq457/tmpcgq8bl09.py", line 1, in <module> N = raw_input('') ^^^^^^^^^ NameError: name 'raw_input' is not defined
s033010107
p04029
u272496669
1478548177
Python
Python (3.4.3)
py
Runtime Error
23
3064
30
n = input() print((n*(n+1))/2)
Traceback (most recent call last): File "/tmp/tmppiqnurla/tmpsxo4jogx.py", line 1, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s817129562
p04029
u971321372
1473582306
Python
PyPy2 (5.6.0)
py
Runtime Error
64
8944
158
n = input() arr = map(int, raw_input().split()) if n == 1: print 0 else: mid = (arr[0] + arr[-1])/2 ans = 0 for e in arr: ans += (e-mid)**2 print ans
File "/tmp/tmppuw9gd87/tmpl__w9cpw.py", line 5 print 0 ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s670817237
p04029
u816175360
1473166726
Python
Python (3.4.3)
py
Runtime Error
40
3064
213
n=int(input()) s=[int(x) for x in input().split()] s.sort() a=s[0] b=s[-1] m=9999999999999 for i in range(a,b+1): sum=0 for j in s: sum+=(j-i)**2 if sum < m: m=sum print(m)
Traceback (most recent call last): File "/tmp/tmpzb3urdnz/tmp6ypssar7.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s654344252
p04029
u816175360
1473166705
Python
Python (3.4.3)
py
Runtime Error
37
3064
213
n=int(input()) s=[int(x) for x in input().split()] s.sort() a=s[0] b=s[-1] m=9999999999999 for i in range(a,b+1): sum=0 for j in s: sum+=(j-i)**2 if sum < m: m=sum print(m)
Traceback (most recent call last): File "/tmp/tmp32wjodj6/tmpya7mtswf.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s803951120
p04029
u706147596
1472418049
Python
Python (2.7.6)
py
Runtime Error
27
2568
372
N = int(raw_input()) numbers = map(int, raw_input().split()) min_num = min(numbers) max_num = max(numbers) min_cost = None for result in xrange(min_num, max_num+1): cost = 0 for number in numbers: cost += (number - result)**2 if min_cost: if min_cost >= cost: min_cost = cost else: min_cost = cost print min_cost
File "/tmp/tmp9j1rzmcq/tmp4j69coph.py", line 19 print min_cost ^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s720074693
p04029
u783939477
1472242563
Python
Python (3.4.3)
py
Runtime Error
39
3064
90
import sys n = int(sys.stdin().strip()) result = str(int(n * (n + 1) / 2)) sys.stdout()
Traceback (most recent call last): File "/tmp/tmplt9xuu9j/tmp73dh64qc.py", line 3, in <module> n = int(sys.stdin().strip()) ^^^^^^^^^^^ TypeError: '_io.TextIOWrapper' object is not callable
s881611124
p04029
u542939897
1472185689
Python
Python (2.7.6)
py
Runtime Error
30
2692
58
N=raw_input() n=0 for i in range(0,N): n+=i print n
File "/tmp/tmp0r4qk1f6/tmpnun8y9aa.py", line 8 print n ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s462238362
p04029
u438131499
1471900658
Python
Python (2.7.6)
py
Runtime Error
28
2568
23
n=raw_input() n*(n-1)/2
Traceback (most recent call last): File "/tmp/tmp7_i6601e/tmplp50qfgr.py", line 1, in <module> n=raw_input() ^^^^^^^^^ NameError: name 'raw_input' is not defined
s713074818
p04029
u337931720
1471689373
Python
Python (2.7.6)
py
Runtime Error
26
2568
164
raw_input() a = [int(x) for x in raw_input().split()] bsc = 1e10 for i in range(-101, 102): sc = 0 for j in a: sc += (j-i)**2 bsc = min(bsc, sc) print bsc
File "/tmp/tmpgkhja1d3/tmp7a1298au.py", line 9 print bsc ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s660460089
p04029
u187430339
1471220651
Python
Python (2.7.6)
py
Runtime Error
26
2568
94
import sys sys.stdin = open('a_2.txt', 'r') N = int(raw_input()) print str(((N+1) * N) / 2)
File "/tmp/tmprg4nszuz/tmppu18jmxx.py", line 6 print str(((N+1) * N) / 2) ^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s782655476
p04029
u751047721
1471213445
Python
Python (3.4.3)
py
Runtime Error
38
3064
65
A = 0 S = input() fot n in range(1,int(S)+1): A = A + n print(A)
File "/tmp/tmpj60n6qpj/tmpkaa5ybin.py", line 3 fot n in range(1,int(S)+1): ^ SyntaxError: invalid syntax
s445181203
p04029
u521667517
1471209256
Python
Python (2.7.6)
py
Runtime Error
26
2568
65
# coding: utf-8 import sys n = int(row_input()) print n*(n+1)/2
File "/tmp/tmpr9jw90cy/tmpbo6ukor8.py", line 6 print n*(n+1)/2 ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s722930474
p04029
u521667517
1471209177
Python
Python (2.7.6)
py
Runtime Error
26
2568
54
# coding: utf-8 n = int(row_input()) print n*(n+1)/2
File "/tmp/tmp3cwty6cx/tmpk0_3s6vw.py", line 5 print n*(n+1)/2 ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s788868739
p04029
u751047721
1471196280
Python
Python (3.4.3)
py
Runtime Error
42
3064
56
A = 0 S = input() fot n in range(1,int(S)+1): A = A + n
File "/tmp/tmpuhwleelu/tmppvadm59o.py", line 3 fot n in range(1,int(S)+1): ^ SyntaxError: invalid syntax
s875454529
p04029
u751047721
1471196162
Python
Python (3.4.3)
py
Runtime Error
38
3064
56
A = 0 S = input() fot n in tange(1,int(S)+1): A = A + n
File "/tmp/tmp152paey7/tmpc9nq6p65.py", line 3 fot n in tange(1,int(S)+1): ^ SyntaxError: invalid syntax
s208468169
p04029
u583826716
1471139543
Python
Python (3.4.3)
py
Runtime Error
37
3064
35
N = input() print(N * (N + 1) / 2)
Traceback (most recent call last): File "/tmp/tmpw0sk9mj4/tmp18c2qlif.py", line 1, in <module> N = input() ^^^^^^^ EOFError: EOF when reading a line
s399175641
p04029
u184598095
1471138940
Python
Python (3.4.3)
py
Runtime Error
1045
14556
185
import numpy as np import math N = int(input()) a = np.array(list(map(int, input().split()))) c = round(a.mean()) res = int(0) for i in a: res += (c - i) ** 2 print(int(res))
Traceback (most recent call last): File "/tmp/tmpivrkwgt4/tmpp852ait8.py", line 3, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s673382157
p04029
u352021237
1471138107
Python
Python (2.7.6)
py
Runtime Error
25
2568
150
n=int(raw_input()) N=map(int,raw_input().split()) add=0 if sum(N)%n==0: a=sum(N)/n else: a=sum(N)/n +1 for i in N: add+=(a-i)**2 print add
File "/tmp/tmprzoxzvmu/tmp4gt_swz9.py", line 10 print add ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s868452444
p04029
u352021237
1471137477
Python
Python (2.7.6)
py
Runtime Error
25
2568
218
n=int(raw_input()) N=map(int,raw_input().split()) if len(set(N))==1: print 0 else: add=0 if sum(N)%n==0: a=sum(N)/n else: a=sum(N)/n+1 for i in N: add+=(a-i)**2 print add
File "/tmp/tmpi5ajmhcu/tmpuf87m4ga.py", line 4 print 0 ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s078269066
p04029
u472492255
1471137207
Python
Python (3.4.3)
py
Runtime Error
37
3064
57
# coding: utf-8 n = int(input()) return n * (n + 1) // 2
File "/tmp/tmpu8aw6spp/tmph4lqcy2_.py", line 4 return n * (n + 1) // 2 ^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: 'return' outside function
s002884118
p04029
u825624694
1471136740
Python
Python (3.4.3)
py
Runtime Error
38
3064
65
a =map(int,input()) s=0 for i in range(a[0]+1): s+=i print(s)
Traceback (most recent call last): File "/tmp/tmpdb855k2c/tmpo33da3zy.py", line 1, in <module> a =map(int,input()) ^^^^^^^ EOFError: EOF when reading a line
s043491142
p04029
u825624694
1471136558
Python
Python (3.4.3)
py
Runtime Error
38
3064
62
a =map(int,input()) s=0 for i in range(a+1): s+=i print(s)
Traceback (most recent call last): File "/tmp/tmp6b8ou860/tmpm1wsxbyu.py", line 1, in <module> a =map(int,input()) ^^^^^^^ EOFError: EOF when reading a line
s259448951
p04029
u982653403
1471136538
Python
Python (3.4.3)
py
Runtime Error
37
3064
30
print(sum(range(1,input()+1)))
Traceback (most recent call last): File "/tmp/tmpn7ars487/tmpk5ut2bw7.py", line 1, in <module> print(sum(range(1,input()+1))) ^^^^^^^ EOFError: EOF when reading a line
s642253996
p04030
u513211419
1601236940
Python
Python (3.8.2)
py
Runtime Error
30
9072
210
s = input() ans = "" for char in s: if char != 'B': ans += char else: if ans == "": pass else: len = len(ans) ans = ans[0:len - 1] print(ans)
Traceback (most recent call last): File "/tmp/tmpdjx_xj5p/tmp2rr86lc2.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s253955641
p04030
u097700948
1600727441
Python
Python (3.8.2)
py
Runtime Error
23
9088
123
s = input() S = s.split('B') for n in range(count): s_B = s.find('B') print( s[s_B-1:s_B+1]) s = s[s_B-1:s_B+1]
Traceback (most recent call last): File "/tmp/tmpe3s7uqoy/tmp9joykvf0.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s043110082
p04030
u758933970
1600491837
Python
Python (3.8.2)
py
Runtime Error
24
9048
247
opperations = list(input()) display_stack = [] for opperation in opperations: if opperation == "B": if display_stack: display_stack.pop() else: display_stack.append(opperation) print(''.join(display_stack)) ß
Traceback (most recent call last): File "/tmp/tmp94p7up8p/tmpv5ifzlf3.py", line 2, in <module> opperations = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s258763168
p04030
u977605150
1600458335
Python
Python (3.8.2)
py
Runtime Error
26
9044
289
a = list(input()) ans = [] for i in range(len(a)): if a[i] == '0': ans.append('0') elif a[i] == '1': ans.append('1') elif a[i] == 'B': if ans == []: continue else: i -= 1 ans.remove(ans[i]) print(''.join(ans))
Traceback (most recent call last): File "/tmp/tmpubc163mm/tmp7rdj71t3.py", line 1, in <module> a = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s521125497
p04030
u044378346
1600185906
Python
Python (3.8.2)
py
Runtime Error
28
8940
281
s = input() ans = '' for i in range(len(s)): if s[i] == '0': ans += '0' elif s[i] == '1': ans += '1' else: if ans != '': ans = ans[:-1] print(ans)
File "/tmp/tmp13dng5gc/tmpygzcmyw8.py", line 1 s = input() IndentationError: unexpected indent
s833201572
p04030
u044378346
1600185740
Python
Python (3.8.2)
py
Runtime Error
24
9048
176
ans = [] a = list(input()) for i in range(len(a)): if(a[i] == '1'): ans.append('1') elif(a[i] == '0'): ans.append('0') elif(a[i] == 'B'): ans.pop() print(''.join(ans))
Traceback (most recent call last): File "/tmp/tmple51iain/tmphkwq_fnk.py", line 2, in <module> a = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s268268610
p04030
u044378346
1600185400
Python
Python (3.8.2)
py
Runtime Error
23
9012
176
ans = [] a = list(input()) for i in range(len(a)): if(a[i] == '1'): ans.append('1') elif(a[i] == '0'): ans.append('0') elif(a[i] == 'B'): ans.pop() print(''.join(ans))
Traceback (most recent call last): File "/tmp/tmp2_a08s2n/tmpfct5kc5m.py", line 2, in <module> a = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s458524667
p04030
u381585104
1600068476
Python
Python (3.8.2)
py
Runtime Error
30
9044
135
s = input() st = [] for e in s: if e == 'B' and len(st) != 0: st.pop() else: st.append(int(e)) print(''.join(map(str,st)))
Traceback (most recent call last): File "/tmp/tmp8lmzo4vg/tmpuo4v5mzf.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s685878708
p04030
u381585104
1600068431
Python
Python (3.8.2)
py
Runtime Error
25
8928
132
s = input() st = [] for e in s: if e == B and len(st) != 0: st.pop() else: st.append(int(e)) print(''.join(map(str,st)))
Traceback (most recent call last): File "/tmp/tmpw9l1fjox/tmpss8u8rhg.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s662989505
p04030
u244836567
1599920844
Python
Python (3.8.2)
py
Runtime Error
26
8956
184
a=input() b="" for i in range(len(a)): if a[i]=="0": b=b+"0" if a[i]=="1": b=b+"1" if a[i]=="B": if a[i]!="": restrip(a) else: a=a print(a)
Traceback (most recent call last): File "/tmp/tmpgjbbfsvm/tmpd2emu1b8.py", line 1, in <module> a=input() ^^^^^^^ EOFError: EOF when reading a line
s789988445
p04030
u918422508
1599812031
Python
Python (3.8.2)
py
Runtime Error
24
8856
202
s = str(input()) a = [] for i in len(s): if s[i] == '0': a.append('0') elif s[i] == '1': a.append('1') else: if len(a) != 0: a.pop() print(''.join(a))
Traceback (most recent call last): File "/tmp/tmppnlqqvh0/tmpddcs82mq.py", line 1, in <module> s = str(input()) ^^^^^^^ EOFError: EOF when reading a line
s277335616
p04030
u863850961
1599706354
Python
Python (3.8.2)
py
Runtime Error
23
9008
396
s=input() list_s=list(s) element='B' l1=['0','1','B'] for i in range(0,len(list_s)-1): if(list_s[i] == element): index_element=list_s[i-1] if(index_element): list_s.remove(index_element) list_s.remove(element) print(list_s) else: list_s.append("s") list_s.remove("s") else: list_s.append("s") list_s.remove("s") print(list_s) list_s.remove('B') print(list_s)
Traceback (most recent call last): File "/tmp/tmphf40qcx4/tmp75z8w1uk.py", line 1, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s864682047
p04030
u863850961
1599706326
Python
Python (3.8.2)
py
Runtime Error
25
8948
394
s=input() list_s=list(s) element='B' l1=['0','1','B'] for i in range(0,len(list_s)): if(list_s[i] == element): index_element=list_s[i-1] if(index_element): list_s.remove(index_element) list_s.remove(element) print(list_s) else: list_s.append("s") list_s.remove("s") else: list_s.append("s") list_s.remove("s") print(list_s) list_s.remove('B') print(list_s)
Traceback (most recent call last): File "/tmp/tmp0xuesxjc/tmpwgeb9bk6.py", line 1, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s463805708
p04030
u244836567
1599700682
Python
Python (3.8.2)
py
Runtime Error
24
9036
180
a=input() b="" for i in range(len(a)): if a[i]=="0": b=b+"0" if a[i]=="1": b=b+"1" if a[i]=="B": if a[i]!="": restrip(a) else: print(a)
File "/tmp/tmp5gcdral8/tmpa15b2f7r.py", line 13 print(a) IndentationError: expected an indented block after 'else' statement on line 11
s022279505
p04030
u282813849
1599322465
Python
Python (3.8.2)
py
Runtime Error
24
9104
108
S = input() F = [] for ch in S: if ch == "B": F.pop() else: F.append(ch) print("".join(F))
Traceback (most recent call last): File "/tmp/tmpa9cxjl1j/tmpf_jp_asc.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s284166846
p04030
u620846115
1599226156
Python
Python (3.8.2)
py
Runtime Error
27
8980
125
n = input() a = "" for i in range(n): if i =="0": a+=i elif i =="1": a+=i elif i =="B": a = a[:-1] print(a)
Traceback (most recent call last): File "/tmp/tmp4bmmuiro/tmpdfhbgujw.py", line 1, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s416225691
p04030
u620846115
1599225721
Python
Python (3.8.2)
py
Runtime Error
25
9008
141
n = input() a = [] for i in range(n): if i =="0": a.append("0") elif i =="1": a.append("1") elif i =="B": a.pop() print(*a)
Traceback (most recent call last): File "/tmp/tmp5jl7889c/tmpptpcwpbi.py", line 1, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s401168327
p04030
u620846115
1599225672
Python
Python (3.8.2)
py
Runtime Error
22
9024
136
n = input() a = "" for i in range(n): if i =="0": a.append(0) elif i =="1": a.append(1) elif i =="B": a.pop() print(a)
Traceback (most recent call last): File "/tmp/tmppqnnk905/tmpros_a1fe.py", line 1, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s270320037
p04030
u786150969
1598651436
Python
Python (3.8.2)
py
Runtime Error
25
9104
248
S = input() a = '' count = 0 for s in S: if s == '0': a +='0' if s == '1': a +='1' if s == 'B': if a != '': a = a.rstrip(a[count-1],1) if a == '': continue count +=1 print(a)
Traceback (most recent call last): File "/tmp/tmp5ad86xoy/tmpmbf9orna.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s639377165
p04030
u786150969
1598651368
Python
Python (3.8.2)
py
Runtime Error
28
9036
246
S = input() a = '' count = 0 for s in S: if s == '0': a +='0' if s == '1': a +='1' if s == 'B': if a != '': a = a.rstrip(a[count-1]) if a == '': continue count +=1 print(a)
Traceback (most recent call last): File "/tmp/tmphtxbajh4/tmp_b52p2wp.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s280182407
p04030
u786150969
1598651230
Python
Python (3.8.2)
py
Runtime Error
31
9292
889
import math from math import gcd,pi INF = float("inf") import sys sys.setrecursionlimit(10**6) import itertools from collections import Counter,deque def i_input(): return int(input()) def i_map(): return map(int, input().split()) def i_list(): return list(i_map()) def i_row(N): return [i_input() for _ in range(N)] def i_row_list(N): return [i_list() for _ in range(N)] def s_input(): return input() def s_map(): return input().split() def s_list(): return list(s_map()) def s_row(N): return [s_input for _ in range(N)] def s_row_str(N): return [s_list() for _ in range(N)] def s_row_list(N): return [list(s_input()) for _ in range(N)] S = s_input() a = '' count = 0 for s in S: if s == '0': a +='0' if s == '1': a +='1' if s == 'B': if a != '': a = a.rstrip(a[count-1]) if a == '': continue count +=1 print(a)
Traceback (most recent call last): File "/tmp/tmpg0g1yau_/tmpq02aj7ob.py", line 21, in <module> S = s_input() ^^^^^^^^^ File "/tmp/tmpg0g1yau_/tmpq02aj7ob.py", line 14, in s_input def s_input(): return input() ^^^^^^^ EOFError: EOF when reading a line
s807653937
p04030
u164776089
1598649505
Python
Python (3.8.2)
py
Runtime Error
27
9084
182
s = str(input()) a = [] for i in s: if i == '0': a.append('0') elif i == '1': a.append('1') elif i == 'B': del a[-1] print(''.join(a))
Traceback (most recent call last): File "/tmp/tmp05sav6qd/tmpzl32vqqu.py", line 1, in <module> s = str(input()) ^^^^^^^ EOFError: EOF when reading a line
s000253590
p04030
u814886720
1597938544
Python
Python (3.8.2)
py
Runtime Error
26
9060
145
s=[] a=int(input()) if a==0: s.append(0) elif a==1: s.append(1) else: if len(s)>0: s.pop() for l in s: print(l)
Traceback (most recent call last): File "/tmp/tmpop_dxjkg/tmpclxl2w9u.py", line 2, in <module> a=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s651677621
p04030
u070423038
1597886302
Python
Python (3.8.2)
py
Runtime Error
24
8944
122
r = [] for i in input(): if 'B' == i: if r: r.pop() else: r.append(i) print(''.join(r)
File "/tmp/tmp2neuh7z7/tmpr1t2_o57.py", line 8 print(''.join(r) ^ SyntaxError: '(' was never closed
s994289816
p04030
u175217658
1596747624
Python
Python (3.8.2)
py
Runtime Error
30
8960
197
S = list(input()) ans = [] for i in range(len(S)): if(S[i] != 'B'): ans.append(S[i]) elif(S[i] == 'B' and len(ans) != 0): ans.remove(ans[i-1]) print(''.join(ans))
Traceback (most recent call last): File "/tmp/tmpbh_u67e6/tmpylc7560k.py", line 1, in <module> S = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s707829785
p04030
u123107676
1596388326
Python
Python (3.8.2)
py
Runtime Error
26
9880
146
import re text = input() b_length = int(re.sub('[^B]', '', text)) for _ in range(b_length): text = re.sub('(0|1)??B', '', text, 1) print(text)
Traceback (most recent call last): File "/tmp/tmpnc5nvknd/tmpdgjw7bh2.py", line 2, in <module> text = input() ^^^^^^^ EOFError: EOF when reading a line
s258122402
p04030
u123107676
1596388232
Python
Python (3.8.2)
py
Runtime Error
32
9944
138
import re text = input() b_length = re.sub('B', '', text) for _ in range(b_length): text = re.sub('(0|1)??B', '', text, 1) print(text)
Traceback (most recent call last): File "/tmp/tmpzc35farv/tmpo0pjpxha.py", line 2, in <module> text = input() ^^^^^^^ EOFError: EOF when reading a line
s732010133
p04030
u259190728
1596014054
Python
Python (3.8.2)
py
Runtime Error
30
9080
1590
from sys import stdin,stdout import bisect import math def st(): return list(stdin.readline().strip()) def inp(): return int(stdin.readline()) def li(): return list(map(int,stdin.readline().split())) def mp(): return map(int,stdin.readline().split()) def pr(n): stdout.write(str(n)+"\n") def soe(limit): l=[1]*(limit+1) prime=[] for i in range(2,limit+1): if l[i]: for j in range(i*i,limit+1,i): l[j]=0 for i in range(2,limit+1): if l[i]: prime.append(i) return prime def segsoe(low,high): limit=int(high**0.5)+1 prime=soe(limit) n=high-low+1 l=[0]*(n+1) for i in range(len(prime)): lowlimit=(low//prime[i])*prime[i] if lowlimit<low: lowlimit+=prime[i] if lowlimit==prime[i]: lowlimit+=prime[i] for j in range(lowlimit,high+1,prime[i]): l[j-low]=1 for i in range(low,high+1): if not l[i-low]: if i!=1: print(i) def gcd(a,b): while b: a=a%b b,a=a,b return a def power(a,n): r=1 while n: if n&1: r=(r*a) a*=a n=n>>1 return r def check(n,s): v=str(n) for i in v: if i in s: return False return True def solve(): l=[] s=input() for i in s: if i=='0' or i=='1': l.append(i) else: l.pop() print(''.join(l)) for _ in range(1): solve()
Traceback (most recent call last): File "/tmp/tmpswvaywar/tmpx8dks12f.py", line 91, in <module> solve() File "/tmp/tmpswvaywar/tmpx8dks12f.py", line 79, in solve s=input() ^^^^^^^ EOFError: EOF when reading a line
s858223141
p04030
u396211450
1596014028
Python
Python (3.8.2)
py
Runtime Error
22
9100
128
s=input() l=[] for i in s: if i=="0": l.append("0") elif i=="1": l.append("1") else: l.pop() print("".join(l))
Traceback (most recent call last): File "/tmp/tmpzfxm1waz/tmp7pqtitl7.py", line 1, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s039037537
p04030
u980503157
1595827901
Python
Python (3.8.2)
py
Runtime Error
29
8956
90
s = input() for i in range(len(s)-1): if s[i+1] != 'B': ans += s[i] print(ans)
Traceback (most recent call last): File "/tmp/tmpasg9tdjy/tmp7qz5g10z.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s970098787
p04030
u980503157
1595827849
Python
Python (3.8.2)
py
Runtime Error
26
8968
87
s = input() for i in range(len(s)): if s[i+1] != 'B': ans += s[i] print(ans)
Traceback (most recent call last): File "/tmp/tmpzy2e0gk8/tmp_7dm4_uc.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s570145218
p04030
u861421280
1595492343
Python
Python (3.8.2)
py
Runtime Error
28
9100
204
k=int(input("enter keys=")) b=" " length=len(s) while length <=1 or length<=0: if k==0 and k==1 and k==b: print(s) elif k==0: print(s=0) elif k==1: print(s=1) else: print(s=b)
Traceback (most recent call last): File "/tmp/tmpu0o7rhos/tmpaf37kfrl.py", line 1, in <module> k=int(input("enter keys=")) ^^^^^^^^^^^^^^^^^^^^ EOFError: EOF when reading a line
enter keys=
s584444201
p04030
u801049006
1595456151
Python
Python (3.8.2)
py
Runtime Error
26
9108
208
s = list(input()) n = len(s) ans = [] for i in range(n): if s[i] == '0': ans.append('0') if s[i] == '1': ans.append('1') if s[i] == 'B': ans[-1] = '' print("".join(ans))
Traceback (most recent call last): File "/tmp/tmpp6onbmuc/tmpg8xxeid3.py", line 1, in <module> s = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s381910811
p04030
u112065131
1595455369
Python
Python (3.8.2)
py
Runtime Error
28
9060
363
# -*- coding: utf-8 -*- # B - バイナリハックイージー s = input() listAns = [] set1 = ['0', '1'] set2 = ['B'] listS = list(s) print(listS) for i in listS: if i in set1: listAns.append(i) elif i in set2: if len(listAns) != 0: listAns.pop() ans = reduce(lambda x, y: x + y, [str(x) for x in listAns]) print(ans)
Traceback (most recent call last): File "/tmp/tmp52yc9uux/tmp1fsvb1zz.py", line 4, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s886225854
p04030
u298101891
1595376691
Python
Python (3.8.2)
py
Runtime Error
24
8892
313
lst=[] res=[] a=input() for i in range(len(a)): lst.append(a[i]) if lst[i] == "0": res.append(lst[i]) elif lst[i] == "1": res.append(lst[i]) else: if res == [] or res[0] == "" : continue else: res.remove(lst[len(res)-1]) print("".join(res))
Traceback (most recent call last): File "/tmp/tmp636oy73z/tmp_wthfe80.py", line 3, in <module> a=input() ^^^^^^^ EOFError: EOF when reading a line
s650832255
p04030
u298101891
1595376599
Python
Python (3.8.2)
py
Runtime Error
28
8952
304
lst=[] res=[] a=input() for i in range(len(a)): lst.append(a[i]) if lst[i] == "0": res.append(lst[i]) elif lst[i] == "1": res.append(lst[i]) else: if res == [] or res[0] == "" : else: res.remove(lst[len(res)-1]) print("".join(res))
File "/tmp/tmpchyw_1ul/tmp8ezvdldr.py", line 13 else: ^ IndentationError: expected an indented block after 'if' statement on line 11
s133999568
p04030
u298101891
1595376481
Python
Python (3.8.2)
py
Runtime Error
23
8996
289
lst=[] res=[] a=input() for i in range(len(a)): lst.append(a[i]) if lst[i] == "0": res.append(lst[i]) elif lst[i] == "1": res.append(lst[i]) else: if res==[]: pass else: res.remove(lst[len(res)-1]) print("".join(res))
Traceback (most recent call last): File "/tmp/tmpkm3zuwtr/tmphbz0pjjx.py", line 3, in <module> a=input() ^^^^^^^ EOFError: EOF when reading a line
s691323239
p04030
u298101891
1595376364
Python
Python (3.8.2)
py
Runtime Error
29
9044
297
lst=[] res=[] a=input() for i in range(len(a)): lst.append(a[i]) if lst[i] == "0": res.append(lst[i]) elif lst[i] == "1": res.append(lst[i]) else: if len(res)==0: continue else: res.remove(lst[len(res)-1]) print("".join(res))
Traceback (most recent call last): File "/tmp/tmp5tlw4bxy/tmpugyaox1u.py", line 3, in <module> a=input() ^^^^^^^ EOFError: EOF when reading a line
s820188771
p04030
u886907961
1594278402
Python
Python (3.8.2)
py
Runtime Error
27
8952
153
n = input() s = " " for i in n: if i == '0': s+='0' elif i=='1': s+='1' if i=='B': s = s.replace(s[-1],'') print(s)
Traceback (most recent call last): File "/tmp/tmps368bpdj/tmpxvhnl7cg.py", line 1, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s018223737
p04030
u786020649
1594245510
Python
Python (3.8.2)
py
Runtime Error
27
8912
126
s=input() ans='' for x in s: if ans<>'': if x=='B' ans=ans[:-1] continue if x<>'B': ans+=x print(ans)
File "/tmp/tmp6oq_ldy7/tmpd_ljv51h.py", line 5 if ans<>'': ^^ SyntaxError: invalid syntax
s412077970
p04030
u520018621
1593672332
Python
Python (3.8.2)
py
Runtime Error
28
8884
71
arr = input() arr = ''.join(reversed(arr)) print(arr[:arr.index('B')])
Traceback (most recent call last): File "/tmp/tmp85rp3k8_/tmpev3nnsc8.py", line 1, in <module> arr = input() ^^^^^^^ EOFError: EOF when reading a line
s327183613
p04030
u333591669
1593657086
Python
Python (3.8.2)
py
Runtime Error
25
9148
524
def key(): a=input() b=input() c=input() d=input() key=[a,b,c,d] if key[0]=='b': print('') elif key[0]=='0': print('0') else: print('1') if key[1]=='b': key.pop() elif key[1]=='0': print('0') else: print('1') if key[2]=='b': key.pop() elif key[2]=='0': print('0') else: print('1') if key[3]=='b': key.pop() elif key[3]=='0': print('0') else: print('1') key()
Traceback (most recent call last): File "/tmp/tmpv1h7tode/tmpxfnnzi_l.py", line 32, in <module> key() File "/tmp/tmpv1h7tode/tmpxfnnzi_l.py", line 2, in key a=input() ^^^^^^^ EOFError: EOF when reading a line
s529113310
p04030
u679817762
1593376989
Python
Python (3.8.2)
py
Runtime Error
25
8884
314
#入力 input = input() lst = [] text = '' #操作 for i in range(len(input)): if input[i] == '0': text = text + '0' elif input[i] == '1': text = text + '1' elif input[i] = 'B': if text != '': #文字列が空でないときのみBS実行 text = text[:-1] #出力 print(text)
File "/tmp/tmphsgie89p/tmpwvfti__b.py", line 13 elif input[i] = 'B': ^^^^^^^^ SyntaxError: cannot assign to subscript here. Maybe you meant '==' instead of '='?
s999855411
p04030
u729119068
1593269708
Python
Python (3.8.2)
py
Runtime Error
27
9036
119
s=input() l=[] for a in s: if a=='0':l.append('0') elif a=='1':l.append('1') else:l.pop() print(''.join(l))
Traceback (most recent call last): File "/tmp/tmp7tdmmz5h/tmpatj_67o2.py", line 1, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line