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
s074621360
p03967
u937642029
1574266506
Python
PyPy3 (2.4.0)
py
Runtime Error
186
38636
1427
from collections import Counter,defaultdict,deque import sys import bisect import math import itertools import queue import copy from scipy import linalg import scipy import numpy as np from heapq import heappop, heappush input = sys.stdin.readline sys.setrecursionlimit(10**8) mod = 10**9+7 def inp(): # n=1 return int(input()) def inpm(): # x=1,y=2 return map(int,input().split()) def inpl(): # a=[1,2,3,4,5,...,n] return list(map(int, input().split())) def inpls(): # a=['1','2','3',...,'n'] return list(input().split()) def inplm(n): # x=[] 複数行 return list(int(input()) for _ in range(n)) def inpll(n): # [[1,1,1,1],[2,2,2,2],[3,3,3,3]] return sorted([list(map(int, input().split())) for _ in range(n)]) def sortx(x,n,k): if k == 0:x.sort(key=lambda y:y[1,n]) else:x.sort(reversed=True, key=lambda y:y[1,n]) def main(): s = input() NG = 1 NP = 0 did = ["g"] point = 0 for i in range(1,len(s)): if s[i] == "g": if NP + 1 <= NG: did.append("p") NP += 1 point += 1 else: did.append("g") NG += 1 else: if NP + 1 <= NG: did.append("p") NP += 1 else: did.append("g") NG += 1 point -= 1 print(point) if __name__ == "__main__": main()
0
s026348230
p03967
u937642029
1574266483
Python
PyPy3 (2.4.0)
py
Runtime Error
179
38256
1425
from collections import Counter,defaultdict,deque import sys import bisect import math from itertools import queue import copy from scipy import linalg import scipy import numpy as np from heapq import heappop, heappush input = sys.stdin.readline sys.setrecursionlimit(10**8) mod = 10**9+7 def inp(): # n=1 return int(input()) def inpm(): # x=1,y=2 return map(int,input().split()) def inpl(): # a=[1,2,3,4,5,...,n] return list(map(int, input().split())) def inpls(): # a=['1','2','3',...,'n'] return list(input().split()) def inplm(n): # x=[] 複数行 return list(int(input()) for _ in range(n)) def inpll(n): # [[1,1,1,1],[2,2,2,2],[3,3,3,3]] return sorted([list(map(int, input().split())) for _ in range(n)]) def sortx(x,n,k): if k == 0:x.sort(key=lambda y:y[1,n]) else:x.sort(reversed=True, key=lambda y:y[1,n]) def main(): s = input() NG = 1 NP = 0 did = ["g"] point = 0 for i in range(1,len(s)): if s[i] == "g": if NP + 1 <= NG: did.append("p") NP += 1 point += 1 else: did.append("g") NG += 1 else: if NP + 1 <= NG: did.append("p") NP += 1 else: did.append("g") NG += 1 point -= 1 print(point) if __name__ == "__main__": main()
File "/tmp/tmpcbczwtv4/tmpzpswt9aa.py", line 5 from itertools ^ SyntaxError: invalid syntax
s579977945
p03967
u937642029
1574266311
Python
PyPy3 (2.4.0)
py
Runtime Error
190
39020
1808
from collections import Counter,defaultdict,deque import sys import bisect import math from itertools import permutations,combinations import string import queue import copy import numpy as np from heapq import heappop, heappush # input = sys.stdin.readline sys.setrecursionlimit(10**8) mod = 10**9+7 def inp(): # n=1 return int(input()) def inpm(): # x=1,y=2 return map(int,input().split()) def inpl(): # a=[1,2,3,4,5,...,n] return list(map(int, input().split())) def inpls(): # a=['1','2','3',...,'n'] return list(input().split()) def inplm(n): # x=[] 複数行 return list(int(input()) for _ in range(n)) def inpll(n): # [[1,1,1,1],[2,2,2,2],[3,3,3,3]] return sorted([list(map(int, input().split())) for _ in range(n)]) def sortx(x,n,k): if k == 0:x.sort(key=lambda y:y[1,n]) else:x.sort(reversed=True, key=lambda y:y[1,n]) def graph(): n=inp() g=[[] for _ in range(n)] for i in range(n): a=inp() a-=1 g[i].append(a) g[a].append(i) return n,g def graphm(): n,m=inpm() g=[[] for _ in range(n)] for _ in range(m): a,b,w=inpm() a-=1 b-=1 g[a].append((b,w)) g[b].append((a,w)) return n,m,g def main():#gpg s = input() NG = 1 NP = 0 did = ["g"] point = 0 for i in range(1,len(s)): if s[i] == "g": if NP + 1 <= NG: did.append("p") NP += 1 point += 1 else: did.append("g") NG += 1 else: if NP + 1 <= NG: did.append("p") NP += 1 else: did.append("g") NG += 1 point -= 1 print(point) if __name__ == "__main__": main()
Traceback (most recent call last): File "/tmp/tmpcjcx7wld/tmpvy5o8u4l.py", line 75, in <module> main() File "/tmp/tmpcjcx7wld/tmpvy5o8u4l.py", line 50, in main s = input() ^^^^^^^ EOFError: EOF when reading a line
s732351832
p03967
u937642029
1574266261
Python
PyPy3 (2.4.0)
py
Runtime Error
183
39148
1870
from collections import Counter,defaultdict,deque import sys import bisect import math from itertools import permutations,combinations import string import queue import copy from scipy import linalg import scipy import numpy as np from heapq import heappop, heappush # input = sys.stdin.readline sys.setrecursionlimit(10**8) mod = 10**9+7 def inp(): # n=1 return int(input()) def inpm(): # x=1,y=2 return map(int,input().split()) def inpl(): # a=[1,2,3,4,5,...,n] return list(map(int, input().split())) def inpls(): # a=['1','2','3',...,'n'] return list(input().split()) def inplm(n): # x=[] 複数行 return list(int(input()) for _ in range(n)) def inpll(n): # [[1,1,1,1],[2,2,2,2],[3,3,3,3]] return sorted([list(map(int, input().split())) for _ in range(n)]) def sortx(x,n,k): if k == 0:x.sort(key=lambda y:y[1,n]) else:x.sort(reversed=True, key=lambda y:y[1,n]) def graph(): n=inp() g=[[] for _ in range(n)] for i in range(n): a=inp() a-=1 g[i].append(a) g[a].append(i) return n,g def graphm(): n,m=inpm() g=[[] for _ in range(n)] for _ in range(m): a,b,w=inpm() a-=1 b-=1 g[a].append((b,w)) g[b].append((a,w)) return n,m,g def main():#gpg s = input() NG = 1 NP = 0 did = ["g"] point = 0 for i in range(1,len(s)): if s[i] == "g": if NP + 1 <= NG: did.append("p") NP += 1 point += 1 else: did.append("g") NG += 1 else: if NP + 1 <= NG: did.append("p") NP += 1 else: did.append("g") NG += 1 point -= 1 print(''.join(did)) print(point) if __name__ == "__main__": main()
Traceback (most recent call last): File "/tmp/tmpt03r5hzm/tmpbwjfrbx0.py", line 78, in <module> main() File "/tmp/tmpt03r5hzm/tmpbwjfrbx0.py", line 52, in main s = input() ^^^^^^^ EOFError: EOF when reading a line
s357656903
p03967
u798818115
1569443281
Python
Python (3.4.3)
py
Runtime Error
2103
136288
342
# coding: utf-8 # Your code here! s=list(input()) count=0 for i in range(len(s)):#偶数ならグー 奇数ならパーになる if s[i]=='g': s[i]=0 else: s[i]=1 print(s) if i&1^s[i]==1 and i&1==1: count+=1 elif i&1^s[i]==1 and s[i]&1==1: count-=1 else: pass print(count)
Traceback (most recent call last): File "/tmp/tmpstn80yhd/tmpn3b41nxl.py", line 3, in <module> s=list(input()) ^^^^^^^ EOFError: EOF when reading a line
s874084118
p03967
u009348313
1569254325
Python
PyPy3 (2.4.0)
py
Runtime Error
288
44528
312
S = input() def dfs(p,a): if p == len(S): return 0 if a > 0 and S[p] == 'g': return max(1+dfs(p+1,a-1),dfs(p+1,a+1)) elif a > 0 and S[p] == 'p': return max(dfs(p+1,a-1),-1+dfs(p+1,a+1)) elif a == 0 and S[p] == 'g': return dfs(p+1,a+1) else: return -1+dfs(p+1,a+1) print(dfs(0,0))
Traceback (most recent call last): File "/tmp/tmpytdhcpqq/tmp6hpiq4qk.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s581876328
p03967
u767664985
1566550655
Python
Python (3.4.3)
py
Runtime Error
17
2940
255
s = input() g_cnt, p_cnt = 0, 0 ans = 0 for si in s: if si = "g": if p_cnt < g_cnt: p_cnt += 1 ans += 1 else: g_cnt += 1 ans -= 1 else: g_cnt += 1 ans += 1 print(ans)
File "/tmp/tmpagn01rul/tmpqjo4fl86.py", line 5 if si = "g": ^^^^^^^^ SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
s561936363
p03967
u095756391
1558843148
Python
Python (3.4.3)
py
Runtime Error
17
3316
256
s = input() subsg = [] subsp = [] sg = 0 sp = 0 ans = 0 for i in range(N): if s[i] == 'g': sg += 1 else: sp += 1 subsg.append(sg) subsp.append(sp) for i in range(N): if subsp <= subsg: ans += 1 print(ans)
Traceback (most recent call last): File "/tmp/tmppdxvef38/tmpn26_p51x.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s143370658
p03967
u450339194
1554612707
Python
Python (3.4.3)
py
Runtime Error
2327
1788348
534
import sys sys.setrecursionlimit(200000) S = input() def hoge(s, p_count): if len(s) == 1: if s[0] == 'g': if p_count > 0: return 1 return 0 else: if p_count > 0: return 0 return -1 p_score = -len(S)-1 if p_count > 0: p_score = hoge(s[1:], p_count-1) g_score = hoge(s[1:], p_count+1) if s[0] == 'g': return max(p_score+1, g_score) else: return max(p_score, g_score-1) print(hoge(S, 0))
Traceback (most recent call last): File "/tmp/tmpnvhrlz5_/tmpawgnijhd.py", line 4, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s704206397
p03967
u371763408
1554377137
Python
Python (3.4.3)
py
Runtime Error
17
2940
205
s=input() gu=0 pa=0 win=0 fot t in s: if t=='g': if gu>pa: pa+=1 win+=1 else: gu+=1 else: if gu>pa: pa+=1 else: win-=1 gu+=1 print(win)
File "/tmp/tmpdjytayt7/tmp6ghm1rsw.py", line 7 fot t in s: ^ SyntaxError: invalid syntax
s267749007
p03967
u118642796
1553796657
Python
Python (3.4.3)
py
Runtime Error
18
3188
139
S = input() ans = 0 for i in range(S): if i%2 == 0 and S[i] == "g": ans += 1 elif i%2 == 1 and S[i] == "p": ans -= 1 print(ans)
Traceback (most recent call last): File "/tmp/tmpv2ys8q3r/tmp1so524y4.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s899546959
p03967
u543954314
1553557046
Python
Python (3.4.3)
py
Runtime Error
17
3188
36
s = input() print(n//2-s.count("p"))
Traceback (most recent call last): File "/tmp/tmp5wneivix/tmpkpyskcvw.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s746093023
p03967
u543954314
1553556639
Python
Python (3.4.3)
py
Runtime Error
17
3188
150
s = input() m = "gp"*(len(s)//2+1) g = 0 for i in range(s): if s[i] == m[i]: continue elif s[i] == "p": g -= 1 else: g += 1 print(g)
Traceback (most recent call last): File "/tmp/tmpp9z1vjti/tmp4lw4y_4a.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s349000291
p03967
u923279197
1553179162
Python
PyPy3 (2.4.0)
py
Runtime Error
177
39536
91
s = input() n = len(s) a = 0 for t in s: if t == 'p': a += 1 print(n//2 - b)
Traceback (most recent call last): File "/tmp/tmp8x_6p9i7/tmp1wx9auq5.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s899152909
p03968
u941407962
1578540070
Python
PyPy3 (2.4.0)
py
Runtime Error
193
38512
1056
from collections import defaultdict N, = map(int, input().split()) dd = defaultdict(int) ss = [] for _ in range(N): a, b, c, d = map(int, input().split()) dd[(a,b,c,d)] += 1 dd[(b,c,d,a)] += 1 dd[(c,d,a,b)] += 1 dd[(d,a,b,c)] += 1 ss.append((a,b,c,d)) def icr(x): a, b, c, d = x for faf in [(b,c,d,a), (c,d,a,b), (d,a,b,c), (a,b,c,d)]: dd[faf] += 1 def dcr(x): a, b, c, d = x for faf in [(b,c,d,a), (c,d,a,b), (d,a,b,c), (a,b,c,d)]: dd[faf] -= 1 def f(ff, gg): a,b,c,d=ff e, h, g, f = gg tl = [(a,e,f,b), (b,f,g,c), (c,g,h,d), (d,h,e,a)] r = 1 for cp in tl: r *= dd[cp] dcr(cp) for cp in tl: icr(cp) return r r = 0 for i in range(N): a,b,c,d = ss[i] ff = (a,b,c,d) dcr(ff) for j in range(I+1, N): if i == j: continue x, y, z, w = ss[j] sl = [(x,y,z,w), (y,z,w,x), (z,w,x,y), (w,x,y,z)] for s in sl: dcr(s) r += f(ff,s) icr(s) icr(ff) print(r//3)
Traceback (most recent call last): File "/tmp/tmpeqgppyzi/tmprodqk07v.py", line 2, in <module> N, = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s810793994
p03968
u102461423
1563005685
Python
PyPy3 (2.4.0)
py
Runtime Error
1036
62424
1565
import sys input = sys.stdin.readline from collections import defaultdict, Counter import itertools mask = (1 << 10) - 1 symmetry = dict() decode = dict() counter = defaultdict(int) def encode(a,b,c,d): t = 1 << 40 for x,y,z,w in [(a,b,c,d), (b,c,d,a), (c,d,a,b), (d,a,b,c)]: u = x + (y << 10) + (z << 20) + (w << 30) if t > u: t = u return t N = int(input()) tiles = [] for _ in range(N): a,b,c,d = map(int,input().split()) t = encode(a,b,c,d) tiles.append(t) counter[t] += 1 if a == b == c == d: symmetry[t] = 4 elif a == c and b == d: symmetry[t] = 2 else: symmetry[t] = 1 decode[t] = (a,b,c,d) P = [(1,n,n*(n-1),n*(n-1)*(n-2),n*(n-1)*(n-2)*(n-3)) for n in range(N+1)] P += [(0,0,0,0,0)] * (N+1) # 負数代入対策 power = [[n ** e for e in range(5)] for n in range(5)] answer = 0 for bottom, top in itertools.combinations(tiles,2): counter[bottom] -= 1 counter[top] -= 1 a,b,c,d = decode[bottom] e,f,g,h = decode[top] for x,y,z,w in [(e,f,g,h), (f,g,h,e), (g,h,e,f), (h,e,f,g)]: # a,b,c,d # x,w,z,y tiles = [encode(p,q,r,s) for p,q,r,s in [(b,a,x,w), (c,b,w,z), (d,c,z,y), (a,d,y,x)]] need = Counter(tiles) x = 1 for tile, cnt in need.items(): x *= P[counter[tile]][cnt] # 残っている個数、必要枚数 x *= power[symmetry[tile]][cnt] answer += x counter[bottom] += 1 counter[top] += 1 # 上下を固定した分 answer //= 3 print(answer)
Traceback (most recent call last): File "/tmp/tmp0r1vx19f/tmpyenqkz41.py", line 20, in <module> N = int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s195579262
p03968
u102461423
1563005642
Python
PyPy3 (2.4.0)
py
Runtime Error
172
38768
1556
import sys input = sys.stdin.readline from collections import defaultdict import itertools mask = (1 << 10) - 1 symmetry = dict() decode = dict() counter = defaultdict(int) def encode(a,b,c,d): t = 1 << 40 for x,y,z,w in [(a,b,c,d), (b,c,d,a), (c,d,a,b), (d,a,b,c)]: u = x + (y << 10) + (z << 20) + (w << 30) if t > u: t = u return t N = int(input()) tiles = [] for _ in range(N): a,b,c,d = map(int,input().split()) t = encode(a,b,c,d) tiles.append(t) counter[t] += 1 if a == b == c == d: symmetry[t] = 4 elif a == c and b == d: symmetry[t] = 2 else: symmetry[t] = 1 decode[t] = (a,b,c,d) P = [(1,n,n*(n-1),n*(n-1)*(n-2),n*(n-1)*(n-2)*(n-3)) for n in range(N+1)] P += [(0,0,0,0,0)] * (N+1) # 負数代入対策 power = [[n ** e for e in range(5)] for n in range(5)] answer = 0 for bottom, top in itertools.combinations(tiles,2): counter[bottom] -= 1 counter[top] -= 1 a,b,c,d = decode[bottom] e,f,g,h = decode[top] for x,y,z,w in [(e,f,g,h), (f,g,h,e), (g,h,e,f), (h,e,f,g)]: # a,b,c,d # x,w,z,y tiles = [encode(p,q,r,s) for p,q,r,s in [(b,a,x,w), (c,b,w,z), (d,c,z,y), (a,d,y,x)]] need = Counter(tiles) x = 1 for tile, cnt in need.items(): x *= P[counter[tile]][cnt] # 残っている個数、必要枚数 x *= power[symmetry[tile]][cnt] answer += x counter[bottom] += 1 counter[top] += 1 # 上下を固定した分 answer //= 3 print(answer)
Traceback (most recent call last): File "/tmp/tmp63g_r8d4/tmpxeksvzmk.py", line 20, in <module> N = int(input()) ^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s419893273
p03970
u468972478
1598106076
Python
Python (3.8.2)
py
Runtime Error
25
8996
99
n = input() a = 0 a = "CODEFESTIVAL2016" for i, j in zip(n, a): if i != j: a += 1 print(a)
Traceback (most recent call last): File "/tmp/tmp42xl70cy/tmp90m_ubfo.py", line 1, in <module> n = input() ^^^^^^^ EOFError: EOF when reading a line
s057141437
p03970
u446371873
1594786459
Python
Python (3.8.2)
py
Runtime Error
21
9060
98
S = input() T = 'CODEFESTIVAL2016' ans = 0 for _ in range(16): ans += S[i] != T[i] print(ans)
Traceback (most recent call last): File "/tmp/tmpk5k8aa7c/tmpa0k13qew.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s959827452
p03970
u350093546
1592854275
Python
PyPy3 (7.3.0)
py
Runtime Error
546
92952
101
s=int(input()) t='CODEFESTIVAL2016' ans=0 for i in range(16): if s[i]!=t[i]: ans+=1 print(ans)
Traceback (most recent call last): File "/tmp/tmppyj7cry8/tmpj9_l0wfx.py", line 1, in <module> s=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s024076730
p03970
u350093546
1592854235
Python
PyPy3 (7.3.0)
py
Runtime Error
100
68768
94
s=int(input()) t='CODEFESTIVAL2016' ans=0 for i in range(16): if s!=t: ans+=1 print(ans)
Traceback (most recent call last): File "/tmp/tmp1s5oidh9/tmpqeeyvwqk.py", line 1, in <module> s=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s646767418
p03970
u295120316
1591908752
Python
Python (3.4.3)
py
Runtime Error
18
3060
373
n,a,b=map(int,input().split()) s=input() cnta=0 cntb=0 for i in range(n): if s[i]=="a": if cnta+cntb<a+b: print("Yes") cnta+=1 else: print("No") elif s[i]=="b": if cntb<b and cnta+cntb<a+b: print("Yes") cntb+=1 else: print("No") else: print("No")
Traceback (most recent call last): File "/tmp/tmp0g909oyi/tmpqafez877.py", line 1, in <module> n,a,b=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s064418938
p03970
u227085629
1590610619
Python
Python (3.4.3)
py
Runtime Error
18
2940
99
s = input() a = 'CODEFESTIVAL2016' b = 0 for i in range(16): if a[i] != b[i]: b += 1 print(b)
Traceback (most recent call last): File "/tmp/tmpe32cdlqb/tmpbpl3q4tg.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s846093840
p03970
u006738234
1589510780
Python
Python (3.4.3)
py
Runtime Error
19
3064
493
N, A, B = (int(x) for x in input().split()) x = input() y = list(x) count_a = 0 count_b = 0 for i in range(0, N): if (y[i] == "a"): if(count_a + count_b < (A + B)): print("Yes") count_a += 1 else: print("No") elif(y[i] == "b"): if(count_a + count_b < (A + B) and count_b < B): print("Yes") count_b += 1 else: print("No") elif(y[i] == "c"): print("No")
Traceback (most recent call last): File "/tmp/tmp3k2dac6r/tmp9icw9tyh.py", line 1, in <module> N, A, B = (int(x) for x in input().split()) ^^^^^^^ EOFError: EOF when reading a line
s000773842
p03970
u425762225
1588090324
Python
PyPy3 (2.4.0)
py
Runtime Error
178
38768
332
N, A, B = map(int,input().split()) S = input() a_counter = 0 b_counter = 0 for i in range(N): s = S[0] if s == "a" and a_counter + b_counter <=A+B: a_counter += 1 print("Yes") elif s == "b" and b_counter <= B and a_counter + b_counter <=A+B: b_counter += 1 print("Yes") else: print("No") S = S[1:]
Traceback (most recent call last): File "/tmp/tmptvh23c1y/tmpg2e5w3ek.py", line 1, in <module> N, A, B = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s094997853
p03970
u174404613
1587583035
Python
Python (3.4.3)
py
Runtime Error
17
2940
90
s="CODEFESTIVAL2016" t=input() ans=0 for c1,c2 in zip(s,t): if c1!=c2 : ns+=1 print(ans)
Traceback (most recent call last): File "/tmp/tmptgfzaajw/tmpqb7kvuqp.py", line 2, in <module> t=input() ^^^^^^^ EOFError: EOF when reading a line
s051682864
p03970
u545644875
1587245204
Python
Python (3.4.3)
py
Runtime Error
18
3064
413
x = list(map(int, input().split())) s = list(input()) y = len(s) for i in (0,y - 1): if s[i] == "c": print("NO") elif s[i] == "b": if i < x[1] + x[2] and i < x[2]: print("YES") else: print("NO") else: if i < x[1] + x[2]: print("YES") else: print("NO")
Traceback (most recent call last): File "/tmp/tmpqckrb6ca/tmp9lm7fkts.py", line 1, in <module> x = list(map(int, input().split())) ^^^^^^^ EOFError: EOF when reading a line
s344838884
p03970
u263933075
1586222432
Python
Python (3.4.3)
py
Runtime Error
17
2940
417
s=input() ans=0 if s[0]=='C': ans+=1 if s[1]='O': ans+=1 if s[2]='D': ans+=1 if s[3]='E': ans+=1 if s[4]='F': ans+=1 if s[5]='E': ans+=1 if s[6]='S': ans+=1 if s[7]='T': ans+=1 if s[8]='I': ans+=1 if s[9]='V': ans+=1 if s[10]='A': ans+=1 if s[11]='L': ans+=1 if s[12]='2': ans+=1 if s[13]='0': ans+=1 if s[14]='1': ans+=1 if s[15]='6': ans+=1 print(ans)
File "/tmp/tmp228ww7fd/tmprzllzso0.py", line 5 if s[1]='O': ^^^^ SyntaxError: cannot assign to subscript here. Maybe you meant '==' instead of '='?
s970750196
p03970
u691018832
1585661522
Python
Python (3.4.3)
py
Runtime Error
20
3060
109
s = input() ans = 'CODEFESTIVAL2016' cnt = 0 for i in range(n): if s[i] != ans[i]: cnt += 1 print(cnt)
Traceback (most recent call last): File "/tmp/tmphn7uc96l/tmp6yj87ypu.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s624077071
p03970
u691018832
1585661462
Python
Python (3.4.3)
py
Runtime Error
17
2940
111
s = input() ans = 'CODEFESTIVAL2016' cnt = 0 for i in range(n): if s[i] = != ans[i]: cnt += 1 print(cnt)
File "/tmp/tmpa_uiem72/tmpdd4bfpk9.py", line 5 if s[i] = != ans[i]: ^ SyntaxError: invalid syntax
s131810783
p03970
u577914737
1577986896
Python
Python (3.4.3)
py
Runtime Error
17
2940
154
a = 'CODEFESTIVAL2016' b = input() lista = list(a) listb = list(b) count = 0 for i in range(len(lista)): if lista[i]!=listb[i]: count++ print(count)
File "/tmp/tmp5hxxssuk/tmpv64v_mlc.py", line 8 count++ ^ SyntaxError: invalid syntax
s858033000
p03970
u577914737
1577986888
Python
Python (3.4.3)
py
Runtime Error
17
2940
154
a = 'CODEFESTIVAL2016' b = input() lista = list(a) listb = list(b) count = 0 for i in range(len(lista)): if lista[i]!=listb[i]: count++ print(count)
File "/tmp/tmp_p9vof7s/tmpwspgroj6.py", line 8 count++ ^ SyntaxError: invalid syntax
s213272625
p03970
u296150111
1574742550
Python
Python (3.4.3)
py
Runtime Error
17
2940
96
s=input() ans="CODEFESTIVAL2016" ans=0 for i in range(16): if s[i]!=ans[i]: ans+=1 print(ans)
Traceback (most recent call last): File "/tmp/tmps7zd05vu/tmphapi3t9f.py", line 1, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s450894608
p03970
u094191970
1574211307
Python
Python (3.4.3)
py
Runtime Error
17
2940
105
s=input() a='CODEFESTIVAL2016' cnt=0 for i in range(len(s)): if s[i]!=a[i]: cnt+=1 print(ans)
Traceback (most recent call last): File "/tmp/tmp2izt8zu7/tmpbgt5o8u8.py", line 1, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s995795741
p03970
u556589653
1571772224
Python
PyPy3 (2.4.0)
py
Runtime Error
167
38384
106
S = input() K = "CODEFESTIVAL2016" sum = 0 for i in range(len(S)): if S[i] != K[i] sum += 1 print(sum)
File "/tmp/tmprr8hsjyo/tmpace0ezng.py", line 5 if S[i] != K[i] ^ SyntaxError: expected ':'
s976012046
p03970
u871596687
1569091316
Python
Python (3.4.3)
py
Runtime Error
17
2940
127
S = list(input()) C = list(CODEFESTIVAL2016) cnt = 0 for i in range(len(C)): if S[i] != C[i]: cnt += 1 print(cnt)
Traceback (most recent call last): File "/tmp/tmpl8ksheaq/tmpq5xcrgq8.py", line 1, in <module> S = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s185309686
p03970
u727801592
1567569917
Python
Python (3.4.3)
py
Runtime Error
17
3188
407
import sys input = sys.stdin.readline W,H=map(int,input().split()) p=sorted(int(input()) for i in range(W)) q=sorted(int(input()) for i in range(H)) ans=sum(p)*(H+1)+sum(q)*(W+1) for i in range(W+H): if p[len(p)-1]>=q[len(q)-1]: ans-=p[len(p)-1]*len(q) p.pop() if p==[]: print(ans) exit() else: ans-=q[len(q)-1]*len(p) q.pop() if q==[]: print(ans) exit()
Traceback (most recent call last): File "/tmp/tmp57ibfj_1/tmpg_m3g01r.py", line 4, in <module> W,H=map(int,input().split()) ^^^ ValueError: not enough values to unpack (expected 2, got 0)
s786471518
p03970
u223646582
1561768798
Python
Python (3.4.3)
py
Runtime Error
17
2940
105
S1=input() S2='CODEFESTIVAL2016' ans=0 for i in len(S1): if S1[i]!=S2[i]: ans+=1 print(ans)
Traceback (most recent call last): File "/tmp/tmp3bh7_uty/tmp4bfh1i2k.py", line 1, in <module> S1=input() ^^^^^^^ EOFError: EOF when reading a line
s680454318
p03970
u223646582
1561768746
Python
Python (3.4.3)
py
Runtime Error
18
2940
104
S1=input() S2='CODEFESTIVAL2016' ans=0 for i in len(S): if S1[i]!=S2[i]: ans+=1 print(ans)
Traceback (most recent call last): File "/tmp/tmpoyakg0zq/tmpn3fo8tfo.py", line 1, in <module> S1=input() ^^^^^^^ EOFError: EOF when reading a line
s706674441
p03970
u331464808
1555692301
Python
Python (3.4.3)
py
Runtime Error
17
2940
96
s= input() ss ="CODEFESTIVAL2016" t = 1 for i in range(ss): if s[i]!=ss[i]: t +=1 print(t)
Traceback (most recent call last): File "/tmp/tmp69slhuhf/tmpgy2nm_qh.py", line 1, in <module> s= input() ^^^^^^^ EOFError: EOF when reading a line
s095969028
p03970
u331464808
1555692262
Python
Python (3.4.3)
py
Runtime Error
17
2940
95
s= input() ss ="CODEFESTIVAL2016" t = 1 for i in range(s): if s[i]==ss[i]: t +=1 print(t)
Traceback (most recent call last): File "/tmp/tmp6r4vouhx/tmp_2himrwe.py", line 1, in <module> s= input() ^^^^^^^ EOFError: EOF when reading a line
s529161376
p03970
u331464808
1555692210
Python
Python (3.4.3)
py
Runtime Error
17
2940
99
s= input() ss =‘CODEFESTIVAL2016’ t = 1 for i in range(s): if s[i]==ss[i]: t +=1 print(t)
File "/tmp/tmpfm3mwhtt/tmpg8rablc_.py", line 2 ss =‘CODEFESTIVAL2016’ ^ SyntaxError: invalid character '‘' (U+2018)
s299405319
p03970
u913110564
1550205005
Python
Python (3.4.3)
py
Runtime Error
17
2940
101
a=input() ans="CODEFESTIVAL2016" diff=0 for i in range(16): if a[i]!=ans[i]: diff++ print(diff)
File "/tmp/tmpou67jg2x/tmp69e7hg75.py", line 6 diff++ ^ SyntaxError: invalid syntax
s211162287
p03970
u595893956
1547534090
Python
Python (3.4.3)
py
Runtime Error
17
2940
99
s=input() t="CODEFESTIVAL2016" ret=0 for i range(s.len()): if s[i] != t[i]: ret+=1 print(ret)
File "/tmp/tmpui9wd84d/tmp39xl6zb5.py", line 4 for i range(s.len()): ^^^^^ SyntaxError: invalid syntax
s658452811
p03970
u089032001
1546312422
Python
Python (3.4.3)
py
Runtime Error
17
2940
102
S = input() ans = "CODEFESTIVAL2016" a = 0 for i in range(S): if S[i] != ans[i]: a += 1 print(a)
Traceback (most recent call last): File "/tmp/tmp7hf8t5yr/tmp0dl3uyg_.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s168439318
p03970
u177398299
1537204838
Python
Python (3.4.3)
py
Runtime Error
17
2940
96
x, y = map(int, input().split()) print(sum(a != b for a, b in zip(input(), 'CODEFESTIVAL2016')))
Traceback (most recent call last): File "/tmp/tmpzyih6gzh/tmpxuiwws08.py", line 1, in <module> x, y = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s250202172
p03970
u898651494
1536943826
Python
Python (3.4.3)
py
Runtime Error
17
2940
2320
#include <iostream> #include <fstream> #include <cmath> #include <cstdlib> #include <ctime> #include <algorithm> #include <numeric> #include <functional> #include <string> #include <vector> #include <bitset> #include <map> #include <set> #include <stack> #include <queue> #include <deque> using namespace std; using ll = long long; using ull = unsigned long long; using ld = long double; #define REP(i,n) for(int i = 0; i < int(n); i++) #define REREP(i,n) for(int i = int(n - 1); i >= 0; i--) #define FOR(i, m, n) for(int i = int(m);i < int(n);i++) #define REFOR(i, m, n) for(int i = int(n - 1);i >= int(m);i--) #define ALL(obj) (obj).begin(),(obj).end() #define VI vector<int> #define VVI vector<vector<int>> #define VVVI vector<vector<vector<int>>> #define VD vector<double> #define VVD vector<vector<double>> #define VVVD vector<vector<vector<double>>> #define VL vector<ll> #define VVL vector<vector<ll>> #define VVVL vector<vector<vector<ll>>> #define VB vector<bool> #define VVB vector<vector<bool>> #define VVVB vector<vector<vector<bool>>> #define VS vector<string> #define VVS vector<vector<string>> #define VVVS vector<vector<vector<string>>> #define PII pair<int,int> #define PDD pair<double,double> #define PLL pair<ll,ll> #define VPII vector<pair<int,int>> #define VVPII vector<vector<pair<int,int>>> #define VVVPII vector<vector<vector<pair<int,int>>>> #define VPLL vector<pair<ll,ll>> #define VVPLL vector<vector<pair<ll,ll>>> #define VVVPLL vector<vector<vector<pair<ll,ll>>>> const ll MOD = (ll)1e9 + 7; // 998244353 const ll HINF = (ll)1e18; const ll LINF = (ll)1e9; const long double PI = 3.1415926535897932384626433; void YN(bool flag) { cout << ((flag) ? "YES" : "NO") << endl; } void Yn(bool flag) { cout << ((flag) ? "Yes" : "No") << endl; } void yn(bool flag) { cout << ((flag) ? "yes" : "no") << endl; } int main() { string s; cin >> s; int ans = 0; if (s[0] != 'C')ans++; if (s[1] != 'O')ans++; if (s[2] != 'D')ans++; if (s[3] != 'E')ans++; if (s[4] != 'F')ans++; if (s[5] != 'E')ans++; if (s[6] != 'S')ans++; if (s[7] != 'T')ans++; if (s[8] != 'I')ans++; if (s[9] != 'V')ans++; if (s[10] != 'A')ans++; if (s[11] != 'L')ans++; if (s[12] != '2')ans++; if (s[13] != '0')ans++; if (s[14] != '1')ans++; if (s[15] != '6')ans++; cout << ans << endl; return 0; }
File "/tmp/tmpqatny7o7/tmpkke5e76m.py", line 18 using namespace std; ^^^^^^^^^ SyntaxError: invalid syntax
s382011332
p03970
u005260772
1533932741
Python
Python (2.7.6)
py
Runtime Error
10
2568
110
s1 = 'CODEFESTIVAL2016' print s2 ans = 0 for i in range(len(s1)): ans += [0, 1][s1[i] != s2[i]] print ans
File "/tmp/tmpuj0dfr87/tmpp2vh9gep.py", line 2 print s2 ^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s319510918
p03970
u108808596
1533085626
Python
Python (2.7.6)
py
Runtime Error
10
2568
96
s=raw_input() t='CODEFESTIVAL2016' c=0 for i in range(16); if s[i] != t[i]: c += 1 print c
File "/tmp/tmpd4p2ohc8/tmpj9yreyzz.py", line 4 for i in range(16); ^ SyntaxError: invalid syntax
s058536471
p03970
u109256064
1531246587
Python
Python (2.7.6)
py
Runtime Error
10
2568
114
a = "REMEMBER TO PUT AC/WA ONLY" b = raw_input() r = 0 for i in xrange(len(a)): if a[i] != b[i]: r += 1 print r
File "/tmp/tmpxrkcprrw/tmpukvl_s8w.py", line 7 print r ^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s002054899
p03970
u030726788
1521574655
Python
Python (3.4.3)
py
Runtime Error
17
3064
92
s=input() co="CODEFESTIVAL2016" cou=0 for i in range(s): if(s[i]!=co[i]):cou+=1 print(cou)
Traceback (most recent call last): File "/tmp/tmpb9jlrd0r/tmpjx1u3ow9.py", line 1, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s967219678
p03970
u729133443
1520914004
Python
Python (3.4.3)
py
Runtime Error
24
3700
86
import difflib;print(difflib.SequenceMatcher(None,'CODEFESTIVAL2016',input())*100//16)
Traceback (most recent call last): File "/tmp/tmptzwredk3/tmp8x16_ea4.py", line 1, in <module> import difflib;print(difflib.SequenceMatcher(None,'CODEFESTIVAL2016',input())*100//16) ^^^^^^^ EOFError: EOF when reading a line
s721647352
p03970
u563710899
1477889100
Python
Python (2.7.6)
py
Runtime Error
17
2696
485
W,H=map(int,raw_input().split()) p=[input() for i in range(W)] q=[input() for i in range(H)] p.sort(reverse=True) q.sort(reverse=True) cost=0 del_H=0 del_W=0 len_p=W len_q=H while len_p>0 and len_q>0: if p[0]>q[0]: del_W+=1 cost+=p[0]*(del_H+1) del p[0] len_p-=1 else: del_H+=1 cost+=q[0]*(del_W+1) del q[0] len_q-=1 if len_p==0: cost+=sum(q)*(W+1) else: cost+=sum(p)*(H+1) print cost
File "/tmp/tmp64t52cgq/tmp5w_p71s5.py", line 34 print cost ^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s519520825
p03970
u967641647
1476475855
Python
Python (2.7.6)
py
Runtime Error
16
2568
471
NAB = map(int, raw_input().split()) N = NAB[0] A = NAB[1] B = NAB[2] S = raw_input() passed_student = 0 for n in range(0, N): if(A+B > passed_student): if(S[n] == 'a'): print 'Yes' passed_student = passed_student + 1 elif(S[n] == 'b'): if(B >= n): print 'Yes' passed_student = passed_student + 1 else: print 'No' else: print 'No' else: print 'No'
File "/tmp/tmplje5af_4/tmpo6woj7z0.py", line 11 print 'Yes' ^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s808335427
p03970
u582243208
1476310775
Python
Python (3.4.3)
py
Runtime Error
24
3188
257
n,a,b=map(int,input().split()) s=input() for i in s: if a+b>0: if i=="a": a-=1 print("Yes") continue elif i=="b" and b>0: b-=1 print("Yes") continue print("No")
Traceback (most recent call last): File "/tmp/tmp2fa3yy1o/tmpy8a8lj21.py", line 1, in <module> n,a,b=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s744535339
p03970
u582243208
1476309338
Python
Python (3.4.3)
py
Runtime Error
23
2940
169
s=list(input()) v=list("CODEFESTIVAL2016") cnt=0 for i in range(16): if s[i]!=v[i]: cnt+=1 print(cnt)
File "/tmp/tmpp0patws4/tmpxqk68rmy.py", line 1 s=list(input()) IndentationError: unexpected indent
s979680875
p03970
u582243208
1476309159
Python
Python (3.4.3)
py
Runtime Error
22
3064
129
s=input() v="CODEFESTIVAL2016" cnt=0 for i in range(16): if s[i]!=v[i]: cnt+=1 print(cnt)
File "/tmp/tmpv6gyu4am/tmpwaorj93e.py", line 1 s=input() IndentationError: unexpected indent
s209080911
p03970
u610929383
1476214919
Python
Python (2.7.6)
py
Runtime Error
21
2692
245
import os import sys import ipdb def dump(x): print >> sys.stderr, "{0}".format(x) S = raw_input() correct = "CODEFESTIVAL2016" false_count = 0 for i, s in enumerate(S): if s != correct[i]: false_count += 1 print(false_count)
Traceback (most recent call last): File "/tmp/tmpe4uxhq26/tmp360sad72.py", line 3, in <module> import ipdb ModuleNotFoundError: No module named 'ipdb'
s132053010
p03970
u552668967
1476209296
Python
Python (2.7.6)
py
Runtime Error
17
2696
147
from sys import stdin a = 'CODEFESTIVAL2016' l = len(a) b = stdin.readline().strip() ans = 0 for i in xrange(l): if a[l]!=b[l]: ans+=1 print ans
File "/tmp/tmp1ddxtc81/tmpc0wjofw4.py", line 9 print ans ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s450751632
p03970
u108617242
1476195450
Python
Python (3.4.3)
py
Runtime Error
23
3064
289
nums = input().split() N = int(nums[0]) A = int(nums[1]) B = int(nums[2]) S = input() count = 0 bcount = 0 for x in S: if x == 'a' and A+B > count: count += 1 print("Yes") elif x == 'b' and A+B > count and bcount < B : count += 1 bcount += 1 print("Yes") else : print("No")
Traceback (most recent call last): File "/tmp/tmpzvm3wj7m/tmpcajojt9z.py", line 1, in <module> nums = input().split() ^^^^^^^ EOFError: EOF when reading a line
s062591317
p03970
u133129810
1476148636
Python
Python (3.4.3)
py
Runtime Error
23
3064
103
str = "CODEFESTIVAL2016" s =input() cnt = 0 for i in range(16): if s[i]!=str[i]: cnt++ print(cnt)
File "/tmp/tmpu2x54qln/tmp9e3le70z.py", line 6 cnt++ ^ SyntaxError: invalid syntax
s263081883
p03970
u953834432
1476132048
Python
Python (3.4.3)
py
Runtime Error
22
3064
181
a = "CODEFESTIVAL2016" b = raw_input() count = 0 c = zip(a, b) for w in c: for i,j in w: if i == j: continue else: count +=1 print(count)
Traceback (most recent call last): File "/tmp/tmpohaw3bm6/tmpm1_ih9b8.py", line 2, in <module> b = raw_input() ^^^^^^^^^ NameError: name 'raw_input' is not defined
s350414745
p03970
u079701009
1476126370
Python
Python (2.7.6)
py
Runtime Error
15
2568
432
w, h = map(int, raw_input().split()) p = [] q = [] for i in xrange(w): p.append(int(raw_input())) for i in xrange(h): q.append(int(raw_input())) wl = w hl = h cost = 0 p.sort() q.sort() p.append(10 ** 8) q.append(10 ** 8) pc = 0 qc = 0 while(wl + hl - pc - qc> 0): if p[pc] < q[qc]: cost += (hl - qc + 1) * p[pc] pc += 1 else: cost += (wl - pc + 1) * q[qc] qc += 1 print cost
File "/tmp/tmp8648vbdn/tmpqngz4ubt.py", line 31 print cost ^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s263570945
p03970
u657357805
1476125093
Python
Python (3.4.3)
py
Runtime Error
23
3064
266
N=int(input()) a=[0]*N for i in range(N): a[i]=int(input()) minimum=1 count=0 for i in a: if(minimum<i): if i%minimum: count+= i//minimum else : count+= (i//minimum-1) else: minimum=max(minimum,i+1) print(count)
Traceback (most recent call last): File "/tmp/tmpfbkkzsf2/tmpovtsskrl.py", line 1, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s749771719
p03970
u851897760
1476124560
Python
Python (3.4.3)
py
Runtime Error
24
3064
466
l = input().split() s = input() n = int(l[0]) a = int(l[1]) b = int(l[2]) count = 0 countt = 0 for i in s: if i == 'a': if count < a+b: count = count + 1 print('Yes') else: print('No') if i == 'b': if (count < a+b) and (countt < b): count = count + 1 countt = countt + 1 print('Yes') else: print('No') if i == 'c': print('No')
Traceback (most recent call last): File "/tmp/tmplinkfjkx/tmpz932pfd8.py", line 1, in <module> l = input().split() ^^^^^^^ EOFError: EOF when reading a line
s009016277
p03970
u548479166
1476122187
Python
PyPy2 (5.6.0)
py
Runtime Error
38
8816
359
n,a,b=map(int,raw_input().split()) ab=a+b s=list(raw_input()) p=0 r=[] ro=0 for i in range(n): if s[i]=="a" and p<ab: r.append("Yes") p+=1 elif s[i]=="b" and p<ab and ro<b: ro+=1 p+=1 r.append("Yes") elif s[i]=="c": r.append("No") else: r.append("No") for i in range(n): print(r[i])
Traceback (most recent call last): File "/tmp/tmpbxy6uovn/tmpzzik0bsk.py", line 1, in <module> n,a,b=map(int,raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s156532182
p03970
u406648710
1476122063
Python
Python (2.7.6)
py
Runtime Error
17
2696
1299
neighbor = lambda c, w, h: filter( lambda b: 0 <= b[0] <= w and 0 <= b[1] <= h, [ (c[0]-1, c[1]), (c[0]+1, c[1]), (c[0], c[1]-1), (c[0], c[1]+1) ] ) t = raw_input() W, H = map(int, t.split(' ')) p, q = [], [] for i in xrange(W): p.append(int(raw_input())) for j in xrange(H): q.append(int(raw_input())) has = [[False for i in xrange(H+1)] for j in xrange(W+1)] has[0][0] = True Next = [(1, 0), (0, 1)] cost = 0 for i in xrange(W*H+W+H): Min = 100000005 choose = None Next.sort(key=lambda a: min(p[a[0]-1] if a[0] > 0 else 100000005, q[a[1]-1] if a[1] > 0 else 100000005)) choose = Next[-1] Min = min(p[choose[0]-1] if choose[0] > 0 else 100000005, q[choose[1]-1] if choose[1] > 0 else 100000005) # for each in Next: # if each[0] > 0: # if p[each[0]-1] < Min: # choose = each # Min = p[each[0]-1] # if each[1] > 0: # if q[each[1]-1] < Min: # choose = each # Min = q[each[1]-1] has[choose[0]][choose[1]] = True Next = Next[:-1] cost += Min for every in neighbor(choose, W, H): # print every if not has[every[0]][every[1]] and every not in Next: Next.append(every) print cost
File "/tmp/tmpvb1lh5b8/tmp8wk0tk2c.py", line 46 print cost ^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s350353346
p03970
u098968285
1476121524
Python
Python (3.4.3)
py
Runtime Error
22
3064
253
# def makelist(n, m): # return [[0 for i in range(m)] for j in range(n)] # n = int(input()) # a, b = map(int, input().split()) # s = input() rei = "CODEFESTIVAL2016" s = input() ans = 0 for i in range(s): if rei[i] != s[i]: ans += 1 print(ans)
Traceback (most recent call last): File "/tmp/tmpwduic8x9/tmphams_kxo.py", line 10, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s876338359
p03970
u279903174
1476120888
Python
Python (2.7.6)
py
Runtime Error
16
2692
447
args = list(map(lambda x: int(x), raw_input().split())) N = args[0] A = args[1] B = args[2] s = input() a = 0 b = 0 for i in range(0, len(s)): if s[i] == 'a': if a + b < A + B: a = a + 1 print('Yes') else: print('No') elif s[i] == 'b': if a + b < A + B and b < B: b = b + 1 print('Yes') else: print('No') else: print('No')
Traceback (most recent call last): File "/tmp/tmpjxfxn4wc/tmptv4u5_4u.py", line 1, in <module> args = list(map(lambda x: int(x), raw_input().split())) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s401313722
p03970
u077337864
1476119999
Python
Python (3.4.3)
py
Runtime Error
22
3064
354
N, A, B = map(int, input().split()) S = input() passed = [] for i in range(N): if S[i] == 'c': print('No') elif S[i] == 'a': if len(passed) <= A+B: print('Yes') passed.append('a') else: print('No') else: if len(passed) <= A+B and passed.count('b') <= B: print('Yes') passed.append('b') else: print('No')
Traceback (most recent call last): File "/tmp/tmpejic1wa8/tmp9yj7ry3o.py", line 1, in <module> N, A, B = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s527838628
p03970
u501661505
1476119245
Python
Python (2.7.6)
py
Runtime Error
16
2568
102
dst = 'CODEFESTIVAL2016' src = raw_input() print sum(1 for i in range(len(dst))) if dst[i] != src[i] )
File "/tmp/tmpb1jebsoy/tmpm3cimon9.py", line 3 print sum(1 for i in range(len(dst))) if dst[i] != src[i] ) ^ SyntaxError: unmatched ')'
s774803548
p03970
u930698267
1476119210
Python
Python (2.7.6)
py
Runtime Error
16
2568
162
correct_str = "CODEFESTIVAL2016" wrong_str = raw_input() count = 0 for i in range(16): if wrong_str[i] != correct_str[i]: count count += 1 print str(count)
File "/tmp/tmpwgzjefpi/tmppuxycgu1.py", line 6 count count += 1 ^^^^^ SyntaxError: invalid syntax
s486638301
p03970
u835464975
1476119127
Python
Python (2.7.6)
py
Runtime Error
16
2568
183
# -*- coding: utf-8 -*- correct = 'CODEFESTIVAL2016' wrong = str(raw_input()) sum = 0 for index in xrange(0, len(wrong)): if correct[i] != wrong[i]: sum += 1 print sum
File "/tmp/tmp6a3dtehh/tmpxlaujdou.py", line 8 print sum ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s798357255
p03970
u729300713
1476119121
Python
Python (2.7.6)
py
Runtime Error
16
2572
132
s = raw_input() c = "CODEFESTIVAL2016" ans = 0 for i in range(len(c)): if s[i] != c[[i]: ans += 1 print ans
File "/tmp/tmpl51zcti_/tmpwwqhsv02.py", line 7 if s[i] != c[[i]: ^ SyntaxError: '[' was never closed
s978021569
p03970
u102438343
1476119116
Python
Python (2.7.6)
py
Runtime Error
16
2572
128
S = raw_input() answer = 0 model = "CODEFESTIVAL2016" for x range(15): if S[x] != model[x]: answer += 1 print answer
File "/tmp/tmppt_jcsuo/tmpmuky_ii6.py", line 4 for x range(15): ^^^^^ SyntaxError: invalid syntax
s133563686
p03970
u592453979
1476119019
Python
Python (2.7.6)
py
Runtime Error
16
2568
119
s = raw_input() orig = 'CODEFESTIVAL2016' result = 0 for i in len(s): if orig[i] != s: result += 1 print result
File "/tmp/tmpp2zanjaq/tmps29t5ojs.py", line 9 print result ^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s004841133
p03970
u147510705
1476118980
Python
Python (2.7.6)
py
Runtime Error
16
2568
118
# get a string s = raw_input() n = 0 for i, c in enumerate('CODEFESTIVAL2016'): if s[i] != c: n++ print n
File "/tmp/tmps6h3h2df/tmpv_6plnsr.py", line 7 n++ ^ SyntaxError: invalid syntax
s398623147
p03970
u471797506
1476118857
Python
Python (2.7.6)
py
Runtime Error
16
2572
106
S = raw_input() T = "CODEFESTIVAL2016" ans = 0 for i in xrange(S): if S[i] != T[i]: ans += 1 print ans
File "/tmp/tmp6_d5p4rs/tmp6o0vpq__.py", line 6 print ans ^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s392437293
p03971
u629540524
1600888313
Python
PyPy3 (7.3.0)
py
Runtime Error
92
74568
286
n,x,y=map(int,input().split()) s= input() c=0 d=x+y f= False for i in range(n): if s[i]=="A": if c<d: f=True elif s[i]=="B": if c<d and c<=b: f=True if f: print("YES") c+=1 else: print("NO") f=False
File "/tmp/tmp_pu4vebj/tmp541sbr1i.py", line 15 c+=1 IndentationError: unexpected indent
s942591766
p03971
u680851063
1599187118
Python
Python (3.8.2)
py
Runtime Error
23
9060
11
5 2 2 ccccc
File "/tmp/tmp3kxjnwk_/tmp4zxqa7_v.py", line 1 5 2 2 ^ SyntaxError: invalid syntax
s891718196
p03971
u456579619
1599009415
Python
Python (3.8.2)
py
Runtime Error
24
8876
405
N, A, B = map(int, input().split()) S = input() ok_count = 0 ok_fcount = 0 for i in range(N): if S[i] == 'a': if ok_count < A+B-1 print('Yes') ok_count +=1 else: print('No') elif S[i] == 'b': if ok_count <= A+B-1 and ok_fcount < B-1: print('Yes') ok_count+=1 ok_fcount+=1 else: print('No') else: print('No')
File "/tmp/tmpphlcrc5e/tmplf1rgxnf.py", line 8 if ok_count < A+B-1 ^ SyntaxError: expected ':'
s313406791
p03971
u456579619
1599009262
Python
Python (3.8.2)
py
Runtime Error
25
9976
408
N, A, B = map(int, input().split()) S = list(input()) ok_count = 0 ok_fcount = 0 for i in range(N): if S[i] == a: if ok_count < A+B-1: print('Yes') ok_count +=1 else: print('No') elif S[i] == b: if ok_count <= A+B-1 and ok_fcount < B-1: print('Yes') ok_count+=1 ok_fcount+=1 else: print('No') else: print('No')
Traceback (most recent call last): File "/tmp/tmp354ra0u2/tmpp_it6kx5.py", line 1, in <module> N, A, B = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s665593372
p03971
u456579619
1599009218
Python
Python (3.8.2)
py
Runtime Error
27
8832
407
N, A, B = map(int, input().split()) S = list(input()) ok_count = 0 ok_fcount = 0 for i in range(N): if S[i] == a: if ok_count < A+B-1 print('Yes') ok_count +=1 else: print('No') elif S[i] == b: if ok_count <= A+B-1 and ok_fcount < B-1: print('Yes') ok_count+=1 ok_fcount+=1 else: print('No') else: print('No')
File "/tmp/tmp8ddrcccy/tmpu5azwlbc.py", line 8 if ok_count < A+B-1 ^ SyntaxError: expected ':'
s728627039
p03971
u456579619
1599009175
Python
Python (3.8.2)
py
Runtime Error
29
8972
413
N, A, B = map(int, input().split()) S = list(input().split) ok_count = 0 ok_fcount = 0 for i in range(N): if S[i] == a: if ok_count < A+B-1 print('Yes') ok_count +=1 else: print('No') elif S[i] == b: if ok_count <= A+B-1 and ok_fcount < B-1: print('Yes') ok_count+=1 ok_fcount+=1 else: print('No') else: print('No')
File "/tmp/tmp9weq9fzd/tmpx9q99pfj.py", line 8 if ok_count < A+B-1 ^ SyntaxError: expected ':'
s360685109
p03971
u456579619
1599009070
Python
Python (3.8.2)
py
Runtime Error
25
8792
394
N, A, B = map(int, input().split()) S = list(input()) ok_count = 0 ok_fcount = 0 for s in S: if s == a: if ok_count < A+B-1 print('Yes') ok_count +=1 else: print('No') elif s == b: if ok_count <= A+B-1 and ok_fcount < B-1: print('Yes') ok_count+=1 ok_fcount+=1 else: print('No') else: print('No')
File "/tmp/tmpp4f5vwd8/tmpfo77vie8.py", line 8 if ok_count < A+B-1 ^ SyntaxError: expected ':'
s810698451
p03971
u456579619
1599008951
Python
Python (3.8.2)
py
Runtime Error
20
8932
400
N, A, B = map(int, input().split()) S = list(input().split) ok_count = 0 ok_fcount = 0 for s in S: if s == a: if ok_count < A+B-1 print('Yes') ok_count +=1 else: print('No') elif s == b: if ok_count <= A+B-1 and ok_fcount < B-1: print('Yes') ok_count+=1 ok_fcount+=1 else: print('No') else: print('No')
File "/tmp/tmpabbwx5ui/tmpezlwtjif.py", line 8 if ok_count < A+B-1 ^ SyntaxError: expected ':'
s765274585
p03971
u456579619
1599008741
Python
Python (3.8.2)
py
Runtime Error
24
8828
402
N, A, B = map(int, input().split()) S = input() ok_count = 0 ok_fcount = 0 for s in S: if s == a: if ok_count < A+B-1 print('Yes') ok_count +=1 else: print('No') elif s == b: if ok_count <= A+B-1 and ok_fcount < B-1: print('Yes') ok_count+=1 ok_fcount+=1 else: print('No') else: print('No')
File "/tmp/tmp9wtsmtrs/tmpskesytlr.py", line 8 if ok_count < A+B-1 ^ SyntaxError: expected ':'
s024156933
p03971
u208120643
1597854085
Python
Python (3.8.2)
py
Runtime Error
120
27312
416
"""Boot-camp-for-Beginners_Easy003_B_Qualification-simulator_19-August-2020.py""" import numpy as np import sys N, A, B = map(int, input().split()) S = str(input()) for i in range(len(N)): if(S[i] == "c"): print("No") else: if(i >= A+B): print("No") else: if(S[i] == "b" and i < B): print("No") else: print("Yes")
Traceback (most recent call last): File "/tmp/tmpcueh47kp/tmpo6mw6mj1.py", line 5, in <module> N, A, B = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s430749050
p03971
u683530136
1597632075
Python
Python (3.8.2)
py
Runtime Error
31
9032
581
# input 参加人数n, 予選通過人数a, 予選通過人数b n, a, b = map(int, input().split()) # input 参加者情報s s = input().split() counter = 0 count_b = 0 for i in s: counter += 1 # cの場合はNo if i == "c": print("No") # aの場合、counter <= A+BであればYes if counter < (a+b): print("Yes") else: print("No") # bの場合、counter <= A+B かつ count_b < B であれば"Yes" if counter < (a+b) && count_b < b: print("Yes") count_b += 1 else: print("No")
File "/tmp/tmpaz_qg22b/tmpujwrznsq.py", line 22 if counter < (a+b) && count_b < b: ^ SyntaxError: invalid syntax
s777154586
p03971
u430336181
1596686271
Python
Python (3.8.2)
py
Runtime Error
20
9216
203
N = int(input()) X = list(map(int, input().split())) HP = [] for p in range(1, 101, 1): P = [p] * len(X) delta = sum([(i - j) ** 2 for (i, j) in zip(X, P)]) HP.append(delta) print(min(HP))
Traceback (most recent call last): File "/tmp/tmp038fx468/tmpw97vrkq0.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s344673379
p03971
u333404917
1595647250
Python
Python (3.8.2)
py
Runtime Error
27
9988
440
n, a, b = map(int, input().split()) s = list(input()) result = [] cnt = 0 cnt_b = 0 limit = a + b for student in s: if student == c: result.append("No") elif (student == "a") & (cnt < limit): result.append("Yes") cnt += 1 elif (student == "b") & (cnt < limit) & (cnt_b < b): result.append("Yes") cnt += 1 cnt_b += 1 else: result.append("No") print("\n".join(result))
Traceback (most recent call last): File "/tmp/tmpbwcjbv00/tmpxr1c_p4e.py", line 1, in <module> n, a, b = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s754105756
p03971
u830881690
1595634510
Python
PyPy3 (7.3.0)
py
Runtime Error
2208
86504
413
n,a,b=map(int, input().split()) s=list(input()) num=0 qual=[] s_b=[i for i,x in enumerate(s) if x=='b'] for i in range(n): if num<a+b: if s[i]=='c': qual.append('No') elif s[i]=='a': num+=1 qual.append('Yes') else: if s_b.index(i)<b: num+=1 qual.append('Yes') else: qual.append('No') else: qual.append('No') print(qual, split='\n')
Traceback (most recent call last): File "/tmp/tmp258w2_01/tmp8m3bsaju.py", line 1, in <module> n,a,b=map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s385955635
p03971
u830881690
1595631362
Python
Python (3.8.2)
py
Runtime Error
22
9232
350
n,a,b=map(int, input().split()) s=input() num=0 s_b=[i for i,x in s if x=='b'] for i in range(n): if s[i]=='c': print('No') elif s[i]=='a': if i <=(a+b): num+=1 print('Yes') else: print('No') else: if s_b.index(i)<=b: num+=1 print('Yes') else: print('No') if num==a+b: break
Traceback (most recent call last): File "/tmp/tmpqbw3_2gu/tmp0qlhthe3.py", line 1, in <module> n,a,b=map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s861623794
p03971
u830881690
1595631187
Python
Python (3.8.2)
py
Runtime Error
25
9916
356
n,a,b=map(int, input().split()) s=list(input()) num=0 s_b=[i for i,x in s if x=='b'] for i in range(n): if s[i]=='c': print('No') elif s[i]=='a': if i <=(a+b): num+=1 print('Yes') else: print('No') else: if s_b.index(i)<=b: num+=1 print('Yes') else: print('No') if num==a+b: break
Traceback (most recent call last): File "/tmp/tmpz3uuqk98/tmpooul84ig.py", line 1, in <module> n,a,b=map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s329996903
p03971
u830881690
1595630828
Python
Python (3.8.2)
py
Runtime Error
25
9304
369
n,a,b=map(int, input().split()) s=list(map(input().split())) num=0 s_b=[i for i,x in s if x=='b'] for i in range(n): if s[i]=='c': print('No') elif s[i]=='a': if i <=(a+b): num+=1 print('Yes') else: print('No') else: if s_b.index(i)<=b: num+=1 print('Yes') else: print('No') if num==a+b: break
Traceback (most recent call last): File "/tmp/tmps9f_6ofg/tmpmrc_54eu.py", line 1, in <module> n,a,b=map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s105652080
p03971
u188305619
1595126251
Python
Python (3.8.2)
py
Runtime Error
30
9088
351
N, A, B = map(int,input().split()) S = input() S = "a"*10000 yosen = 0 yosen_b = 1 for i in range(N): if S[i] == "a" and yosen < (A + B): print("Yes") yosen += 1 elif S[i] == "b" and yosen < (A + B) and yosen_b <= B: print("Yes") yosen += 1 yosen_b += 1 else: print("No")
Traceback (most recent call last): File "/tmp/tmprhbpl_mc/tmpvsblbk37.py", line 1, in <module> N, A, B = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s505781095
p03971
u266014018
1595044378
Python
Python (3.8.2)
py
Runtime Error
23
8824
613
#include<bits/stdc++.h> #define rep(i, n) for (int i=0; i < n; i++) typedef long long ll; using namespace std; int main() { int n, a, b; cin >> n >> a >> b; int total = a + b; string s; cin >> s; int cnt = 0, cntb = 0; rep(i,n){ string ans = "Yes"; if (s[i] == 'c') { ans = "No"; } else if (s[i] == 'a') { if (cnt < a+b) cnt++; else ans = "No"; } else { cntb++; if (cnt < a+b && cntb <= b) cnt++; else ans = "No"; } cout << ans << endl; } }
File "/tmp/tmp8vikw11b/tmpwy75myzu.py", line 3 typedef long long ll; ^^^^ SyntaxError: invalid syntax
s835199905
p03971
u266014018
1595044336
Python
Python (3.8.2)
py
Runtime Error
19
8988
614
#include<bits/stdc++.h> #define rep(i, n) for (int i=0; i < n; i++) typedef long long ll; using namespace std; int main() { int n, a, b; cin >> n >> a >> b; int total = a + b; string s; cin >> s; int cnt = 0, cntb = 0; rep(i,n){ string ans = "Yes"; if (s[i] == 'c') { ans = "No"; } else if (s[i] == 'a') { if (cnt < a+b) cnt++; else ans = "No"; } else { cntb++; if (cnt < a+b and cntb <= b) cnt++; else ans = "No"; } cout << ans << endl; } }
File "/tmp/tmpiu5a4915/tmpyli7vqfm.py", line 3 typedef long long ll; ^^^^ SyntaxError: invalid syntax
s848913933
p03971
u091051505
1593826264
Python
Python (3.8.2)
py
Runtime Error
24
9108
402
n, A, B = map(int, input().split()) a, b = 0 s = input() for i in range(n): s_i = s[i] if s_i == 'a': if (a + b) < (A + B): a += 1 print('Yes') else: print('No') elif s_i == 'b': if ((a + b) < (A + B)) & (b < B): b += 1 print('Yes') else: print('No') else: print('No')
Traceback (most recent call last): File "/tmp/tmpp1kh1gbt/tmpapmj6rvk.py", line 1, in <module> n, A, B = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s750976530
p03971
u091051505
1593826115
Python
Python (3.8.2)
py
Runtime Error
20
8904
334
n, A, B = map(int, input().split()) a, b = 0 s = input() for i in range(n): s_i = s[i] if s_i == 'a': if (a + b) < (A + B): a += 1 print('Yes') else: print('No') elif s_i == 'b': if ((a + b) < (A + B)) & (b < B): b += 1 print('Yes') else: print('No') else: print('No')
File "/tmp/tmpzicyv_58/tmpzqky83xc.py", line 10 else: TabError: inconsistent use of tabs and spaces in indentation