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
s755849830
p04035
u107077660
1470015814
Python
Python (3.4.3)
py
Runtime Error
102
14304
349
N, M = map(int, input().split()) x = [] y = [] for i in range(1,M+1): z = list(map(int,input().split())) x.append(z[0]) y.append(z[1]) a = [0] b = [1]*N for i in range(M): b[x[i]-1] -= 1 b[y[i]-1] += 1 if x[i]-1 in a: a.append(y[i]-1) if b[x[i]-1] == 0: a.remove(x[i]-1) c = 0 for i in range(len(a)): if b[...
Traceback (most recent call last): File "/tmp/tmp83tf251j/tmp1kabreqg.py", line 1, in <module> N, M = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s058771279
p04037
u423585790
1590705292
Python
PyPy3 (2.4.0)
py
Runtime Error
173
38384
138
n=int(input()) a=sorted(map(int,input().split()))[::-1] j=i=0 while n:i+=a[i]>i;j+=a[j]>=i,n-=1 print('SFeicrosntd'[(a[i-1]^i|j^i)&1::2])
File "/tmp/tmpasmnp3dm/tmpj2awuezi.py", line 4 while n:i+=a[i]>i;j+=a[j]>=i,n-=1 ^^ SyntaxError: invalid syntax
s579115943
p04037
u423585790
1590705225
Python
PyPy3 (2.4.0)
py
Runtime Error
177
38548
142
n=int(input()) a=sorted(map(int,input().split()))[::-1] j=i=x=0 while x<n:i+=a[i]>i;j+=a[j]>=i,x+=1 print('SFeicrosntd'[(a[i-1]^i|j^i)&1::2])
File "/tmp/tmplsqszy86/tmpv48bylus.py", line 4 while x<n:i+=a[i]>i;j+=a[j]>=i,x+=1 ^^ SyntaxError: invalid syntax
s548095993
p04037
u102461423
1574525171
Python
Python (3.4.3)
py
Runtime Error
82
12596
355
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines N,*A = map(int,read().split()) A.sort(reverse = True) A.append(0) i = 0 while A[i + 1] < i + 1: i += 1 x = A[i] - (i + 1) y = max(j for j in range(N) if A[j] <= i + 1) - i answer = 'First' if x&1...
Traceback (most recent call last): File "/tmp/tmprb9w5bsr/tmpg_s1c6zb.py", line 6, in <module> N,*A = map(int,read().split()) ^^^^ ValueError: not enough values to unpack (expected at least 1, got 0)
s121873961
p04037
u892251744
1569943181
Python
PyPy3 (2.4.0)
py
Runtime Error
2106
63856
798
N = int(input()) a = list(map(int, input().split())) a.sort(reverse=True) i = 0 j = N-1 t = 0 while True: j -= 1 if i == j: if (a[i] - t) % 2 == 1: win1 = 0 else: win1 = 1 break t += 1 while a[i] == t: i += 1 if i == j: if (a[i] - t) %...
Traceback (most recent call last): File "/tmp/tmpnd3wv28o/tmps81pfrd0.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s470846087
p04037
u945080461
1470027198
Python
Python (2.7.6)
py
Runtime Error
281
11568
1512
from sys import stdin from collections import deque n = int(stdin.readline()) a = map(int, stdin.readline().split()) a.sort() f = 1 q = deque(a) t = 1 while 1: if len(q) == 1: f = (q[0] - t + 1) & 1 ^ 1 break if t == q[0] == q[-1]: f = len(q) & 1 ^ 1 break x = q.pop() if ...
File "/tmp/tmpy_g_oxqu/tmpv2g0e1nr.py", line 37 print "First" if f else "Second" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s491346115
p04037
u945080461
1470019685
Python
Python (2.7.6)
py
Runtime Error
26
2568
389
a = map(int, stdin.readline().split()) a.sort() def f(j, t): global n for i in xrange(j, n): if a[i] != a[j]: break else: i = n x = (a[j] - t) & 1 y = (i - j) & 1 if i == n: return x ^ y elif (a[j] - t) == 1: return not f(i, a[j]) else: ...
File "/tmp/tmpfmczb8yf/tmpm7b3gn17.py", line 18 print "First" if f(0, 0) else "Second" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s931866396
p04037
u277373937
1470019224
Python
Python (2.7.6)
py
Runtime Error
1436
114784
952
import numpy as np input1 = raw_input() input2 = raw_input() N = int(input1) list = input2.split() a = np.zeros(len(list), np.uint8) for i, element in enumerate(list): a[i] = int(element) def play(turn, a, N): if N == 1 and a[0] == 1: if turn % 2 == 0: print 'Second' else: ...
File "/tmp/tmpqubnzw_2/tmpyx3l2x27.py", line 13 print 'Second' ^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s589605561
p04037
u277373937
1470018893
Python
Python (2.7.6)
py
Runtime Error
1422
114784
805
import numpy as np input1 = raw_input() input2 = raw_input() N = int(input1) list = input2.split() a = np.zeros(len(list), np.uint8) for i, element in enumerate(list): a[i] = int(element) def play(turn, a, N): if N == 1 and a[0] == 1: if turn % 2 == 0: print 'Second' else: ...
File "/tmp/tmpec8y7l5d/tmpysrvd46s.py", line 13 print 'Second' ^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s619177586
p04037
u277373937
1470018689
Python
Python (2.7.6)
py
Runtime Error
1437
114780
662
import numpy as np input1 = raw_input() input2 = raw_input() N = int(input1) list = input2.split() a = np.zeros(len(list), np.uint8) for i, element in enumerate(list): a[i] = int(element) def play(turn, a, N): if N == 1 and a[0] == 1: if turn % 2 == 0: print 'Second' else: ...
File "/tmp/tmp2t00x0d0/tmp5bnne9wo.py", line 13 print 'Second' ^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s788201309
p04039
u385551158
1601249802
Python
Python (3.8.2)
py
Runtime Error
31
9144
818
s = input() s = s.split(" ") N = s[0] K = int(s[1]) s = input() s = s.split(" ") ds = [int(digit) for digit in s] minNum = min([digit for digit in range(0, 10) if digit not in ds]) maxNum = max([digit for digit in range(0, 10) if digit not in ds]) digits = [int(digit) for digit in N] result = N for index in range(0...
Traceback (most recent call last): File "/tmp/tmppuz5ge72/tmp8dm8eiv8.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s496028011
p04039
u385551158
1601249427
Python
Python (3.8.2)
py
Runtime Error
27
9200
739
s = input() s = s.split(" ") N = s[0] K = int(s[1]) s = input() s = s.split(" ") ds = [int(digit) for digit in s] minNum = min([digit for digit in range(0, 10) if digit not in ds]) maxNum = max([digit for digit in range(0, 10) if digit not in ds]) digits = [int(digit) for digit in N] result = N for index in range(0...
Traceback (most recent call last): File "/tmp/tmpcd0ibvhz/tmpxjatle1p.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s482817317
p04039
u374051158
1596038528
Python
Python (3.8.2)
py
Runtime Error
25
9080
228
n, k = map(int, input().split()) d = list(map(int, input().split())) def is_ok(num): s = str(num) for ng in d: if ng in s: return False return True while True: if is_ok(n): print(n) exit() n += 1
Traceback (most recent call last): File "/tmp/tmp6zfl6d1h/tmpzh8mtqwt.py", line 1, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s676207138
p04039
u437215432
1592233708
Python
Python (3.4.3)
py
Runtime Error
20
3064
619
# ARC058A import itertools n, k = map(int, input().split()) d = set(input().split()) # n, k = map(int, '1110 8'.split()) # d = set('1 3 4 5 6 7 8 9'.split()) valid = {'0', '1', '2', '3', '4', '5', '7', '6', '7', '8', '9'} d2 = list(valid - d) n2 = list(str(n)) pos = [] for i, c in enumerate(n2): if c not in d2:...
Traceback (most recent call last): File "/tmp/tmpgkfdq92_/tmp0kq73tmp.py", line 5, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s907848109
p04039
u658113376
1590365441
Python
Python (3.4.3)
py
Runtime Error
18
3064
1447
oldMoney, hateNumberLength = map(list, input().split()) hateLines = list(str(input()).rsplit(" ")) okLines = [] FirstBigList = [] newMoney = list(oldMoney) def FindFirstBig(okLines,m,FirstBig): for i in okLines: if i > m: FirstBig.append(i) return FirstBig for i in range(10): if str(i) ...
/tmp/tmp_aoi5w_8/tmp9_n1e138.py:30: SyntaxWarning: "is not" with a literal. Did you mean "!="? if ProblemFlag is not 0: /tmp/tmp_aoi5w_8/tmp9_n1e138.py:40: SyntaxWarning: "is" with a literal. Did you mean "=="? if ProblemFlag is 0: Traceback (most recent call last): File "/tmp/tmp_aoi5w_8/tmp9_n1e138.py", line 1,...
s686502094
p04039
u658113376
1590359530
Python
Python (3.4.3)
py
Runtime Error
18
3064
394
oldMoney, hateNumberLength = map(list, input().split()) hateLines = list(str(input()).rsplit(" ")) okLines = [] #newMoney = 0 for i in range(10): if str(i) not in hateLines and str(i) > oldMoney[0]: okLines.append(i) for index,m in enumerate(oldMoney): if m in hateLines and okLines is not None: ...
Traceback (most recent call last): File "/tmp/tmpwb259f3k/tmpxc58z41o.py", line 1, in <module> oldMoney, hateNumberLength = map(list, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s345856215
p04039
u658113376
1590359272
Python
Python (3.4.3)
py
Runtime Error
17
3064
372
oldMoney, hateNumberLength = map(list, input().split()) hateLines = list(str(input()).rsplit(" ")) okLines = [] newMoney = 0 for i in range(10): if str(i) not in hateLines and str(i) > oldMoney[0]: okLines.append(i) for index,m in enumerate(oldMoney): if m in hateLines and okLines is not None: o...
Traceback (most recent call last): File "/tmp/tmp6xz5qr39/tmpo_k_sxsk.py", line 1, in <module> oldMoney, hateNumberLength = map(list, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s413011872
p04039
u110580875
1586200690
Python
Python (3.4.3)
py
Runtime Error
17
3064
499
import sys n,k=map(int,input().split()) d=list(map(int,input().split())) num=[] sub=[] ans="" for i in [0,1,2,3,4,5,6,7,8,9]: if i not in d: num.append(i) n=str(n) for i in range(int(len(n))): if len(ans)>0: if int(ans[0])>=int(n[i-1]): subans=ans for w in range(int(len(n))-i): ans+="...
Traceback (most recent call last): File "/tmp/tmplib8ab28/tmpvohm5kau.py", line 3, in <module> n,k=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s314760694
p04039
u110580875
1586199710
Python
Python (3.4.3)
py
Runtime Error
17
3064
472
import sys n,k=map(int,input().split()) d=list(map(int,input().split())) num=[] ans="" sub=[] for i in [0,1,2,3,4,5,6,7,8,9]: if i not in d: num.append(i) n=str(n) for i in range(len(n)): if len(ans)>0: if str(ans[0])>=n[i-1] and min(num)>=int(n[i]): for w in range(int(len(n))-i): ans+=str(...
Traceback (most recent call last): File "/tmp/tmpuefwh54a/tmpet3o26oz.py", line 3, in <module> n,k=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s541426369
p04039
u110580875
1586199692
Python
Python (3.4.3)
py
Runtime Error
17
3064
461
import sys n,k=map(int,input().split()) d=list(map(int,input().split())) num=[] ans="" sub=[] for i in [0,1,2,3,4,5,6,7,8,9]: if i not in d: num.append(i) n=str(n) for i in range(len(n)): if len(ans)>0: if str(ans[0])>=n[i-1] and min(num)>=int(n[i]): for w in range(int(len(n))-i): ans+=str(...
Traceback (most recent call last): File "/tmp/tmprfn265pe/tmpej7i_s6a.py", line 3, in <module> n,k=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s620501472
p04039
u878849567
1586197233
Python
Python (3.4.3)
py
Runtime Error
28
2940
200
n, k = map(int, input().split()) d = list(input().split()) for i in reversed(range(n, 10001)): for j in range(k): if d[j] in str(i): break else: ans = i print(ans)
Traceback (most recent call last): File "/tmp/tmppbbuhato/tmpqc01sfic.py", line 1, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s692430555
p04039
u102242691
1585369984
Python
Python (3.4.3)
py
Runtime Error
17
2940
183
n,m = input().split() k = int(n) l = list(input().split()) for i in range(k,100000): for x in l: for x str(i): break else: print(i) break
File "/tmp/tmp7ymul36m/tmp3632bnv4.py", line 8 for x str(i): ^^^ SyntaxError: invalid syntax
s090509318
p04039
u102242691
1585369831
Python
Python (3.4.3)
py
Runtime Error
17
2940
184
n,m = input().split() k = int(n) l = list(input().split()) for i in range(k,100000): for x in l: for y str(i): break else: print(i) break
File "/tmp/tmplzhmvpla/tmpoo55k_bm.py", line 8 for y str(i): ^^^ SyntaxError: invalid syntax
s916274699
p04039
u328067859
1583258350
Python
Python (3.4.3)
py
Runtime Error
17
3060
174
n,k = map(int, input().split()) d = list(map(int, input().split())) e = [0,1,2,3,4,5,6,7,8,9] d = e - d for i in d: for j in d: if int(ij) >= n: print(ij)
Traceback (most recent call last): File "/tmp/tmpdn1dbbnt/tmpmffuq3dl.py", line 1, in <module> n,k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s451800067
p04039
u018679195
1580538090
Python
PyPy3 (2.4.0)
py
Runtime Error
168
38384
234
n, k = map(int, input().split()) d = map(str, input().split()) digits = set(d) num = {str(i) for i in range(0,10)} left = num - digits for i in range(N, 100000): Num = set(str(i)) if Num <= left: print(i) break
Traceback (most recent call last): File "/tmp/tmp8vjqe4e0/tmpoibkz4u3.py", line 1, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s623820988
p04039
u021759654
1573271703
Python
Python (3.4.3)
py
Runtime Error
17
3060
186
n, k = map(int, input().split()) Ds = list(map(int, input().split())) for i in range(n, n*11): for d in Ds: if d in int(list(str(i))): break else: print(i) exit(0)
Traceback (most recent call last): File "/tmp/tmp7nzm90fx/tmpslk9_6hm.py", line 1, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s789529389
p04039
u141610915
1566527408
Python
Python (3.4.3)
py
Runtime Error
19
3064
495
from bisect import bisect_left as bl N, K = map(list, input().split()) D = list(map(int, input().split())) D = [i for i in range(10) if not i in D] res = [] big = 0 if int("".join([str(D[-1])] * len(N))) < int("".join(N)): if D[0] == 0: res = [D[1]] + [0] * len(N) else: res = [D[1]] * (len(N) + 1) else: f...
Traceback (most recent call last): File "/tmp/tmp9ym92gz1/tmpz03zbcpj.py", line 2, in <module> N, K = map(list, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s005716656
p04039
u778814286
1561847305
Python
PyPy3 (2.4.0)
py
Runtime Error
164
38256
1835
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using pll = pair<ll, ll> ; using pld = pair<ld, ld>; const int INF=1e9+7; const ll LINF=1LL<<60 ; const ll MOD=1e9+7 ; const ld PI=acos(-1); const ld EPS = 1e-9; //微調整用(EPSより小さいと0と判定など) #define gcd __gcd //llは受け取ってくれない int lc...
File "/tmp/tmp0i189hv4/tmpuzd0jwbr.py", line 9 const ll LINF=1LL<<60 ; ^ SyntaxError: invalid decimal literal
s176588490
p04039
u139937121
1560589384
Python
Python (2.7.6)
py
Runtime Error
21
3324
857
import collections, heapq, math, sys n, k = map(int, sys.stdin.readline().rstrip().split(' ')) dislikes = map(int, sys.stdin.readline().rstrip().split(' ')) dislikess= set(dislikes) for i in range(9): if i not in dislikess: smallest = i break cp = n s = [] while cp: s.append(cp%10) cp //= 10 s.append(0) ...
Traceback (most recent call last): File "/tmp/tmp6_wu6jjo/tmp5n1ge54i.py", line 3, in <module> n, k = map(int, sys.stdin.readline().rstrip().split(' ')) ^^^^ ValueError: invalid literal for int() with base 10: ''
s280834946
p04039
u798129018
1558155477
Python
PyPy3 (2.4.0)
py
Runtime Error
187
38512
875
from itertools import* from math import* from collections import* from heapq import* from bisect import bisect_left,bisect_right from copy import deepcopy inf = 10**18 mod = 10**9+7 from functools import reduce import sys sys.setrecursionlimit(10**7) H,W,A,B = map(int,input().split()) fac = [0]*(H+W) finv = [0]*(H+W) ...
Traceback (most recent call last): File "/tmp/tmp6glevuiw/tmpnt5str70.py", line 13, in <module> H,W,A,B = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s974524719
p04039
u798129018
1558155456
Python
PyPy3 (2.4.0)
py
Runtime Error
166
38256
622
H,W,A,B = map(int,input().split()) fac = [0]*(H+W) finv = [0]*(H+W) inv = [0]*(H+W) fac[0]=fac[1]=1 finv[0]=finv[1]=1 inv[1]=1 for i in range(2,H+W): fac[i] = fac[i-1] * i % mod inv[i] = mod - inv[mod%i]*(mod//i)%mod finv[i] = finv[i-1]*inv[i]%mod def comb(n,r): if n < r: return 0 ...
Traceback (most recent call last): File "/tmp/tmpwj6mja77/tmpzp62oia5.py", line 1, in <module> H,W,A,B = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s435942107
p04039
u095426154
1558143184
Python
PyPy3 (2.4.0)
py
Runtime Error
169
38256
427
h,w,a,b=map(int,input().split()) arr=[[0 for i in range(w)] for i in range(h)] for i in range(h): for j in range(w): if i>=h-a and j<=b-1: continue if i==0 and j==0: arr[i][j]=1 elif i==0: arr[i][j]=arr[i][j-1] elif j==0: arr[i][j]=arr[...
Traceback (most recent call last): File "/tmp/tmpbda7y83x/tmp5vvv9cdy.py", line 1, in <module> h,w,a,b=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s766832393
p04039
u882620594
1554900265
Python
Python (3.4.3)
py
Runtime Error
25
3060
328
import sys N, K = map(int,input().split()) D = list(input().split()) flg = 1 for i in range(N, 10001): flg = 1 cost = str(i) digit = len(cost) for j in range(digit): if cost[j] in D: flg = 0 break if flg == 1: print(cost) sys.exit() print("error") sys...
Traceback (most recent call last): File "/tmp/tmplxqogu8b/tmprbz4pyz6.py", line 3, in <module> N, K = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s735362977
p04039
u450339194
1554589042
Python
Python (3.4.3)
py
Runtime Error
21
3064
593
import itertools N, K = map(int, input().split()) Ds = list(map(int, input().split())) NDs = list(set([i for i in range(10)]) - set(Ds)) NDs = list(map(str, NDs)) min_price = 10000 for p in itertools.product(NDs, repeat=len(str(N))): if p[0] == '0': continue price = int(''.join(p)) if price < N: ...
Traceback (most recent call last): File "/tmp/tmpe1b8ccdk/tmphax6yrru.py", line 3, in <module> N, K = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s844057985
p04039
u346194435
1553286463
Python
Python (3.4.3)
py
Runtime Error
18
3064
1104
import bisect N, K = input().split() dList = [int(x) for x in input().split()] useList = [0,1,2,3,4,5,6,7,8,9] for d in dList: useList.remove(d) result = '' if int(N[0]) > max(useList): # 桁上げが必要 if useList[0] != 0: result += str(useList[0]) else: result += str(useList[1]) result += ...
Traceback (most recent call last): File "/tmp/tmpzo4vbbpk/tmp23v5pxjo.py", line 3, in <module> N, K = input().split() ^^^^^^^ EOFError: EOF when reading a line
s945375472
p04039
u346194435
1553285406
Python
Python (3.4.3)
py
Runtime Error
18
3064
883
import bisect N, K = input().split() dList = [int(x) for x in input().split()] useList = [0,1,2,3,4,5,6,7,8,9] for d in dList: useList.remove(d) result = '' if int(N[0]) > max(useList): # 桁上げが必要 if useList[0] != 0: result += str(useList[0]) else: result += str(useList[1]) result += ...
Traceback (most recent call last): File "/tmp/tmppmwiqkif/tmpx71ri4i2.py", line 3, in <module> N, K = input().split() ^^^^^^^ EOFError: EOF when reading a line
s845867428
p04039
u367130284
1552349132
Python
Python (3.4.3)
py
Runtime Error
18
2940
103
n,_=input().split();s={*input()};n=int(n);print(n+[len(s&set(str(b)))for b in range(n,99999)].index(0))
Traceback (most recent call last): File "/tmp/tmpm_p87wl9/tmpaau4r4mw.py", line 1, in <module> n,_=input().split();s={*input()};n=int(n);print(n+[len(s&set(str(b)))for b in range(n,99999)].index(0)) ^^^^^^^ EOFError: EOF when reading a line
s652320084
p04039
u729133443
1552349098
Python
Python (3.4.3)
py
Runtime Error
82
2940
67
n=int(input()[:4]);a=set(input()) while a&set(str(n)):n+=1 print(n)
Traceback (most recent call last): File "/tmp/tmpjyet9f9s/tmpocr2yi09.py", line 1, in <module> n=int(input()[:4]);a=set(input()) ^^^^^^^ EOFError: EOF when reading a line
s252807386
p04039
u729133443
1552349073
Python
Python (3.4.3)
py
Runtime Error
84
2940
67
n=int(input()[:5]);a=set(input()) while a&set(str(n)):n+=1 print(n)
Traceback (most recent call last): File "/tmp/tmph0fc766l/tmp66lyr2gb.py", line 1, in <module> n=int(input()[:5]);a=set(input()) ^^^^^^^ EOFError: EOF when reading a line
s274577543
p04039
u346194435
1551896120
Python
Python (3.4.3)
py
Runtime Error
21
3064
652
import bisect N, K = input().split() dList = [int(x) for x in input().split()] useList = [0,1,2,3,4,5,6,7,8,9] for d in dList: useList.remove(d) result = '' if int(N[0]) > max(useList): # 桁上げが必要 if useList[0] != 0: result += str(useList[0]) else: result += str(useList[1]) result += ...
Traceback (most recent call last): File "/tmp/tmpvi_xdd9k/tmpe_x2dn_c.py", line 3, in <module> N, K = input().split() ^^^^^^^ EOFError: EOF when reading a line
s904159342
p04039
u346194435
1551895927
Python
Python (3.4.3)
py
Runtime Error
18
3064
650
import bisect N, K = input().split() dList = [int(x) for x in input().split()] useList = [0,1,2,3,4,5,6,7,8,9] for d in dList: useList.remove(d) result = '' if int(N[0]) > max(useList): # 桁上げが必要 if useList[0] != 0: result += str(useList[0]) else: result += str(useList[1]) result += ...
Traceback (most recent call last): File "/tmp/tmp_3wsxujm/tmpdpu35d8z.py", line 3, in <module> N, K = input().split() ^^^^^^^ EOFError: EOF when reading a line
s084473212
p04039
u585482323
1547766686
Python
PyPy3 (2.4.0)
py
Runtime Error
191
38256
1598
#!usr/bin/env python3 def LI(): return list(map(int, input().split())) def II(): return int(input()) def LS(): return input().split() def S(): return input() def LIR(n): return [LI() for i in range(n)] #A """ s = S() if s[0] != "A": print("WA") else: count = [] for i in range(2,len(s)-1): if s[i] =...
File "/tmp/tmpm0mvacj1/tmpc7viqwq3.py", line 57 """ ^ SyntaxError: unterminated triple-quoted string literal (detected at line 113)
s906446946
p04039
u054106284
1547344555
Python
Python (3.4.3)
py
Runtime Error
21
3316
172
N, K = (int(i) for i in input().split()) D = [int(i) for i in input().split()] for i in range(N, 100000): for d in D: if d not in str(i): break print(i)
Traceback (most recent call last): File "/tmp/tmpb7ekml9p/tmptoh2lfq_.py", line 1, in <module> N, K = (int(i) for i in input().split()) ^^^^^^^ EOFError: EOF when reading a line
s861977481
p04039
u237362582
1545955494
Python
Python (3.4.3)
py
Runtime Error
18
3060
272
N, T = map(int, input().split(' ')) t = list(map(int, input().split(' '))) t_interval = [t[i+1]-t[i] for i in range(N-1)] ans = 0 for i in range(N-1): if t_interval[i] <= T: ans += t_interval[i] elif t_interval[i] > T: ans += T ans += T print(ans)
Traceback (most recent call last): File "/tmp/tmpm4eg58f1/tmp_zac7lzk.py", line 1, in <module> N, T = map(int, input().split(' ')) ^^^^^^^ EOFError: EOF when reading a line
s290018711
p04039
u848647227
1543806031
Python
Python (3.4.3)
py
Runtime Error
18
3060
226
ar = list(map(int,input().split(" "))) while True: count = 0 br = list(str(a)) for r in br: if int(r) in ar: count += 1 if count == 0: print(a) break else: a += 1
Traceback (most recent call last): File "/tmp/tmp4gns1_8v/tmpydiphk1p.py", line 1, in <module> ar = list(map(int,input().split(" "))) ^^^^^^^ EOFError: EOF when reading a line
s014784632
p04039
u803848678
1543607853
Python
Python (3.4.3)
py
Runtime Error
20
3064
414
import bisect n, k = list(map(int, input().split())) d = list(map(int, input().split())) can_use = list(set([i for i in range(10)]) - set(d)) can_use.sort() s = str(n) ans = "" up = 0 for ind, i in enumerate(s[::-1]): num = int(i) + up if num in can_use: ans += str(num) up = 0 else: ...
Traceback (most recent call last): File "/tmp/tmpw1xttoit/tmpbmhqarut.py", line 3, in <module> n, k = list(map(int, input().split())) ^^^^^^^ EOFError: EOF when reading a line
s520323102
p04039
u062147869
1542342747
Python
PyPy3 (2.4.0)
py
Runtime Error
200
40688
304
import sys N,K=map(int,input().split()) D=[int(i) for i in input().split()] L=[0]*10 for i in range(K): L[D[i]]=1 for i in range(N,10000): x=str(i) flag=True for k in range(4): y=int(x[k]) if L[y]==1: flag=False if flag: print(i) sys.exit()
Traceback (most recent call last): File "/tmp/tmplppfjibl/tmpzjvrt_re.py", line 2, in <module> N,K=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s086599657
p04039
u785989355
1541395193
Python
Python (2.7.6)
py
Runtime Error
10
2568
171
N,K =list(map(int,input().split())) D = list(map(str,input().split())) for i in range(N,100000): if len(set(list(str(i)))&set(D))==0: print(i) break
Traceback (most recent call last): File "/tmp/tmp9i2h50_s/tmp7l6tzcih.py", line 2, in <module> N,K =list(map(int,input().split())) ^^^^^^^ EOFError: EOF when reading a line
s209400761
p04039
u349836672
1540018644
Python
Python (3.4.3)
py
Runtime Error
17
3064
474
# coding: utf-8 n, _ = [int(s) for s in input().strip().split()] ds = [int(s) for s in input().strip().split()] available_nums = [i for i in range(10) if i not in ds] output_num_str = "" for i, c in enumerate(str(n)): selected_d = min([d for d in available_nums if d >= int(c)]) output_num_str += str(selected...
Traceback (most recent call last): File "/tmp/tmpykrb54rv/tmp7w_gre1n.py", line 2, in <module> n, _ = [int(s) for s in input().strip().split()] ^^^^^^^ EOFError: EOF when reading a line
s371933040
p04039
u388927326
1538803156
Python
PyPy3 (2.4.0)
py
Runtime Error
166
38640
1176
#!/usr/bin/env python3 import functools MOD = 1000000007 fact = [] def main(): h, w, a, b = map(int, input().split()) init_fact(200000, MOD) mp = get_list_middle_points(h, w, a, b) res = 0 for y, x in mp: res += count(1, 1, x, y) * count(x, y, w, h) res %= MOD print(res) ...
Traceback (most recent call last): File "/tmp/tmp0yjx54fm/tmpjjezx9bw.py", line 58, in <module> main() File "/tmp/tmp0yjx54fm/tmpjjezx9bw.py", line 9, in main h, w, a, b = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s659221882
p04039
u536113865
1538681124
Python
Python (3.4.3)
py
Runtime Error
17
3064
585
ai = lambda: list(map(int,input().split())) mod = 10**9+7 def nCb(n, b): if b > n - b: b = n - b r = 1 for k in range(n, n-b, -1): r = r * k % mod d = 1 for k in range(1, b+1): d = d * k % mod return r * inv(d) % mod def inv(x): return pow(x, mod - 2, mod) h,w,...
Traceback (most recent call last): File "/tmp/tmp7yghpras/tmpczm3ya4i.py", line 22, in <module> h,w,a,b = ai() ^^^^ File "/tmp/tmp7yghpras/tmpczm3ya4i.py", line 1, in <lambda> ai = lambda: list(map(int,input().split())) ^^^^^^^ EOFError: EOF when reading a line
s041500464
p04039
u536113865
1538681086
Python
Python (3.4.3)
py
Runtime Error
17
3064
635
ai = lambda: list(map(int,input().split())) ai_ = lambda: [int(x)-1 for x in input().split()] mod = 10**9+7 def nCb(n, b): if b > n - b: b = n - b r = 1 for k in range(n, n-b, -1): r = r * k % mod d = 1 for k in range(1, b+1): d = d * k % mod return r * inv(d) % mod ...
Traceback (most recent call last): File "/tmp/tmpyez2t52d/tmpsv26dtvo.py", line 23, in <module> h,w,a,b = ai() ^^^^ File "/tmp/tmpyez2t52d/tmpsv26dtvo.py", line 1, in <lambda> ai = lambda: list(map(int,input().split())) ^^^^^^^ EOFError: EOF when reading a line
s939293989
p04039
u827202523
1537588825
Python
Python (3.4.3)
py
Runtime Error
17
2940
294
def dig_check(i,d): for k in [int(j) for j in str(i)]: if k in d: return False return True N,K = input.split() N = int(N) d = [int(i) for i in input.split()] for i in range(10001): if i > N : if dig_check(i,d): print(i) break
Traceback (most recent call last): File "/tmp/tmp3tick88s/tmp9spkm7xw.py", line 8, in <module> N,K = input.split() ^^^^^^^^^^^ AttributeError: 'builtin_function_or_method' object has no attribute 'split'
s430422137
p04039
u517190578
1528970692
Python
Python (3.4.3)
py
Runtime Error
17
3064
534
n, k = map(int , input().split()) l = input() l = [int(i) for i in l.split()] n=str(n) minn = 0 for i in range(0,10) : if not(i in l ): minn = str(i) break x = "" flag = 0 temp = 0 for i in range(len(n)) : if temp==0 : for j in range(int(n[i]) , 10): if not(j in l) ...
Traceback (most recent call last): File "/tmp/tmpgfozk2f0/tmpuprn6xhq.py", line 1, in <module> n, k = map(int , input().split()) ^^^^^^^ EOFError: EOF when reading a line
s287876038
p04039
u873591811
1522876148
Python
Python (3.4.3)
py
Runtime Error
17
3064
662
import random numbers = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] count = random.randint(1, 9) dk, i = [], 0 while i < count: m = random.choice(numbers) if m not in dk: dk.append(m) i += 1 else: continue number_input = random.randint(10, 10000) number_result = number_input...
File "/tmp/tmp1bp5wasw/tmp_b9uo0xs.py", line 29 print('%d %d'%(number_input, count) ^ SyntaxError: '(' was never closed
s523573099
p04039
u925364229
1522364362
Python
Python (3.4.3)
py
Runtime Error
20
3188
598
import bisect N,K = map(str,input().split(" ")) D = list(map(int,input().split(" "))) D_bar = [] for i in range(1,10): if not i in D: D_bar.append(i) D_bar.sort() l = len(N) ans = N if int(N[0]) in D: if N[0] == '9': ans = '10' + '0'*(l-1) else: p = bisect. bisect_left(D_bar,int(N[0])) ans = str(D_bar[p]) +...
Traceback (most recent call last): File "/tmp/tmpw5mn293n/tmpbb8kv4_v.py", line 2, in <module> N,K = map(str,input().split(" ")) ^^^^^^^ EOFError: EOF when reading a line
s741601542
p04039
u653005308
1521925757
Python
Python (3.4.3)
py
Runtime Error
76
4480
772
def base_N(N,n,n_N):#N進数に変換 if n==0: return int(n_N[::-1]) else: n_N+=str(n%N) n=n//N return base_N(N,n,n_N) """ def base_N_10(N,n):#N進数を10進数に変換 n_10=0 for i in range(len(str(n))): n_10+=int(str(n)[i])*N**(len(str(n))-i-1) return n_10 """ n,k=map(int,input()...
Traceback (most recent call last): File "/tmp/tmpiw9s5wht/tmpa7jxsskr.py", line 17, in <module> n,k=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s724959445
p04039
u653005308
1521925061
Python
Python (3.4.3)
py
Runtime Error
77
4476
771
def base_N(N,n,n_N):#N進数に変換 if n==0: return int(n_N[::-1]) else: n_N+=str(n%N) n=n//N return base_N(N,n,n_N) """ def base_N_10(N,n):#N進数を10進数に変換 n_10=0 for i in range(len(str(n))): n_10+=int(str(n)[i])*N**(len(str(n))-i-1) return n_10 """ n,k=map(int,input()...
Traceback (most recent call last): File "/tmp/tmp1shx9z_m/tmpq5_ew1e9.py", line 17, in <module> n,k=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s083072878
p04039
u653005308
1521924803
Python
Python (3.4.3)
py
Runtime Error
76
4476
764
def base_N(N,n,n_N):#N進数に変換 if n==0: return int(n_N[::-1]) else: n_N+=str(n%N) n=n//N return base_N(N,n,n_N) def base_N_10(N,n):#N進数を10進数に変換 n_10=0 for i in range(len(str(n))): n_10+=int(str(n)[i])*N**(len(str(n))-i-1) return n_10 n,k=map(int,input().split...
Traceback (most recent call last): File "/tmp/tmpz503mdrq/tmplk7wmre1.py", line 17, in <module> n,k=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s053955392
p04039
u237316771
1518120132
Python
Python (2.7.6)
py
Runtime Error
11
2696
367
n,k=raw_input().split();u=sorted({chr(x)for x in range(48,59)}-set(raw_input().split()));z=u[0];n=list(n) i=next(i for i,d in enumerate(n)if d not in u) n[i:]=[next(e for e in u if e>n[i])]+[z]*(len(n)-i-1) for j in range(i-1,-1,-1): if n[j+1]<':':break n[j:j+2]=[next(e for e in u if e>n[j]),z] else: if n[0]>'9':n=[...
File "/tmp/tmptv3te0ie/tmpr5py7xcx.py", line 9 print"".join(n) ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s637529685
p04039
u237316771
1518119741
Python
Python (2.7.6)
py
Runtime Error
12
2696
378
n,k=raw_input().split() u=sorted({chr(x)for x in range(48,59)}-set(raw_input().split())) n=list(n) for i,d in enumerate(n): if d not in u: n[i:]=[next(e for e in u if e>d)]+[u[0]]*(len(n)-i-1) for j in range(i-1,-1,-1): if n[j+1]!=':':break n[j:j+2]=[next(e for e in u if e>n[j+1]),u[0]] else: if n[0]=='...
File "/tmp/tmp00cmtfne/tmphlw9ep45.py", line 12 print"".join(n) ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s856689290
p04039
u237316771
1518119635
Python
Python (2.7.6)
py
Runtime Error
14
2820
361
n,k=raw_input().split() u=sorted({chr(x)for x in range(48,59)}-set(raw_input().split())) n=list(n) for i,d in enumerate(n): if d not in u: n[i:]=[next(e for e in u if e>d)]+[u[0]]*(len(n)-i-1) for j in range(i-1,-1,-1): if n[j+1]!=':':break n[j:j+2]=[next(e for e in u if e>n[j+1]),u[0]] else:n=[u[1 if'1'>u...
File "/tmp/tmph_fdj49l/tmpaulncdxf.py", line 11 print"".join(n) ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s554418469
p04039
u237316771
1518118757
Python
Python (2.7.6)
py
Runtime Error
12
2820
205
n,k=raw_input().split() u=sorted({str(x)for x in range(10)}-set(raw_input().split())) n=list(n) for i,d in enumerate(n): if d not in u:n[i:]=[next(e for e in u if e>d)]+[u[0]]*(len(n)-i-1) print"".join(n)
File "/tmp/tmpbhf0mjkl/tmp3ekcc9o9.py", line 6 print"".join(n) ^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s836121169
p04039
u667084803
1510045912
Python
Python (3.4.3)
py
Runtime Error
17
3064
617
def comb(n,k,p): """power_funcを用いて(nCk) mod p を求める""" from math import factorial if n<0 or k<0 or n<k: return 0 if n==0 or k==0: return 1 a=factorial(n) %p b=factorial(k) c=factorial(n-k) return (a*power_func(b,p-2,p)*power_func(c,p-2,p))%p def power_func(a,b,p): """a^b mod p を求める""" if b==0: re...
Traceback (most recent call last): File "/tmp/tmpc_brss6p/tmp48m1qe2u.py", line 20, in <module> H,W,A,B=map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s631422732
p04039
u986399983
1491422050
Python
Python (3.4.3)
py
Runtime Error
158
13280
361
import scipy.misc as scm H, W, A, B = [int(i) for i in input().split()] MOD = 10**9 + 7 f = [1] a = [1] for i in range(1, H+W-1): f.append((f[i-1] * i) % MOD) a.append(pow(f[i], MOD-2, MOD)) ans = 0 for i in range(B, W, 1): ans += (((f[(H-A-1)+i] * a[H-A-1] * a[i]) % MOD) * ((f[(A-1)+(W-1-i)] * a[A-1] * a[...
Traceback (most recent call last): File "/tmp/tmphscbkwwq/tmp76r9h0sq.py", line 3, in <module> H, W, A, B = [int(i) for i in input().split()] ^^^^^^^ EOFError: EOF when reading a line
s572558751
p04039
u820351940
1479258006
Python
Python (3.4.3)
py
Runtime Error
126
9800
341
import urllib.request n, k = map(int, input().split()) d = input().split() urllib.request.urlopen("http://ctare.cloudapp.net:8000?n={}&k={}&d={}".format(n, k, "_".join(d))) cnt = 0 while str(n)[cnt:]: cnt += 1 t = int(str(n)[-cnt]) tmp = t while str(t % 10) in d: t += 1 n += (t - tmp) * 10...
Traceback (most recent call last): File "/tmp/tmpfja0tdcr/tmp86i7citb.py", line 2, in <module> n, k = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s139752633
p04039
u346308892
1475104759
Python
Python (3.4.3)
py
Runtime Error
22
3064
202
i=0 while True: for k in range(9): if x[i] in D: x[i]+=1 else: i+=1 break if k==9: break if i==len(x): break
Traceback (most recent call last): File "/tmp/tmpkdtdr0jv/tmpodzxg1ah.py", line 6, in <module> if x[i] in D: ^ NameError: name 'x' is not defined
s519569167
p04039
u566924053
1469323261
Python
Python (2.7.6)
py
Runtime Error
41
2692
361
# coding: utf-8 import itertools n, k = map(int, raw_input().split()) ls = map(int, raw_input().split()) kls = [] for i in range(10): if i not in ls: kls.append(i) #print ls,kls ans_list = [] for element in itertools.product(kls, repeat=len(str(n))): a = int("".join(map(str,element))) if a >= n: ...
File "/tmp/tmpv6v6r1p9/tmpmit4gr2h.py", line 15 print ans_list[0] ^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s245223769
p04040
u844789719
1598329649
Python
Python (3.8.2)
py
Runtime Error
2285
2910936
1451
class Factorial: def __init__(self, max_fact, mod): #mod should be prime number #using homogeneous_product(n,r), max_fact ≧ max(n+r-1) f = [1] * (max_fact + 1) for idx in range(2, max_fact + 1): f[idx] = f[idx - 1] * idx f[idx] %= mod if mod > max_fact...
Traceback (most recent call last): File "/tmp/tmplahjahuh/tmps_qe7b8g.py", line 47, in <module> H, W, A, B = [int(_) for _ in input().split()] ^^^^^^^ EOFError: EOF when reading a line
s020572821
p04040
u844789719
1598329612
Python
Python (3.8.2)
py
Runtime Error
2293
3462576
1424
class Factorial: def __init__(self, max_fact, mod): #mod should be prime number #using homogeneous_product(n,r), max_fact ≧ max(n+r-1) f = [1] * (max_fact + 1) for idx in range(2, max_fact + 1): f[idx] = f[idx - 1] * idx f[idx] %= mod if mod > max_fact...
Traceback (most recent call last): File "/tmp/tmpaxy6tvo9/tmp780fejwk.py", line 47, in <module> H, W, A, B = [int(_) for _ in input().split()] ^^^^^^^ EOFError: EOF when reading a line
s443143495
p04040
u077291787
1581536794
Python
Python (3.4.3)
py
Runtime Error
18
3192
1682
""" fast way to compute a combination using inverse factorials O(N) to construct tables -> O(1) to compute each combination """ from typing import List, Tuple def get_fact(lim: int) -> List[int]: """Compute a table of factorials (1-indexed).""" fact = [1] * (lim + 1) x = 1 for i in range(1, lim + 1): ...
Traceback (most recent call last): File "/tmp/tmpdpbdlmzd/tmpa9ifhanp.py", line 65, in <module> main() File "/tmp/tmpdpbdlmzd/tmpa9ifhanp.py", line 55, in main H, W, A, B = tuple(map(int, input().split())) ^^^^^^^ EOFError: EOF when reading a line
s903328771
p04040
u018679195
1580116172
Python
Python (3.4.3)
py
Runtime Error
2104
14972
519
h,w,a,b= map(int,input().split()) k=h-a l=b-1 print(k,l) def fun(x,y,k,l): print(x,y,h,w) if(x== h-1 and y== w-1): return(1) else: kk=0 #print(h,w,k,l) if(x+1 < h and y <w): if(x+1 >= k and y <= l): pass else: kk+=fun(x+...
Traceback (most recent call last): File "/tmp/tmp8xyj1n13/tmpl3ijt099.py", line 1, in <module> h,w,a,b= map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s067181092
p04040
u018679195
1579335122
Python
Python (3.4.3)
py
Runtime Error
17
3060
255
import math rows=int(input()); cols=int(input()); m=int(input()); n=int(input()); ans1=math.factorial(cols+rows-2)/((math.factorial(cols-1))*math.factorial(rows-1)); ans2=math.factorial(m+n-2)/((math.factorial(m-1))*math.factorial(n-1)); print(ans1-ans2)
Traceback (most recent call last): File "/tmp/tmpg3uk9899/tmpgeqolgl5.py", line 2, in <module> rows=int(input()); ^^^^^^^ EOFError: EOF when reading a line
s556979481
p04040
u903596281
1551423405
Python
Python (3.4.3)
py
Runtime Error
18
3064
278
import math def comb(n, r): return f[n] // (f[n-r] * f[r]) H,W,A,B=map(int,input().split()) f=[1] for i in range(1,100001): f.append(f[i-1]*i%M) M=10**9+7 ans=0 for i in range(B,W): a=comb(H-A-1+i,i)%M b=comb(A+W-2-i,W-1-i)%M c=(a*b)%M ans+=c ans%=M print(ans)
Traceback (most recent call last): File "/tmp/tmpjf8ld9jc/tmpab865u8e.py", line 6, in <module> H,W,A,B=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s515459501
p04040
u375616706
1548533247
Python
Python (3.4.3)
py
Runtime Error
32
3064
357
def comb(n, r): r = min(r, n-r) ret = 1 for i in range(r): ret *= (n-i)/(r-i) return int(ret) mod = 10**9+7 H, W, A, B = map(int, input().split()) all_path = comb(H+W-2, H-1) remove_path = 0 for i in range(B): tmp = comb(H-A+i, i) tmp *= comb(W-i-1, A-1) remove_path += tmp p...
Traceback (most recent call last): File "/tmp/tmph9xm2nve/tmp6h77_uy6.py", line 13, in <module> H, W, A, B = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s532479604
p04040
u423585790
1547767562
Python
PyPy3 (2.4.0)
py
Runtime Error
178
38512
728
mod = 1000000007 H, W, A, B = map(int, raw_input().split()) factorial = [1] for n in range(1, H+W): factorial.append(factorial[n-1]*n%mod) def power(x, y): if y == 0 : return 1 elif y == 1 : return x % mod elif y % 2 == 0 : return power(x, y/2)**2 % mod else : return power(x, ...
Traceback (most recent call last): File "/tmp/tmpm1wl_tlj/tmp276smurp.py", line 2, in <module> H, W, A, B = map(int, raw_input().split()) ^^^^^^^^^ NameError: name 'raw_input' is not defined
s060331022
p04040
u986399983
1491421953
Python
Python (3.4.3)
py
Runtime Error
374
24676
360
import scipy.misc as scm H, W, A, B = [int(input()) for _ in range(4)] MOD = 10**9 + 7 f = [1] a = [1] for i in range(1, H+W-1): f.append((f[i-1] * i) % MOD) a.append(pow(f[i], MOD-2, MOD)) ans = 0 for i in range(B, W, 1): ans += (((f[(H-A-1)+i] * a[H-A-1] * a[i]) % MOD) * ((f[(A-1)+(W-1-i)] * a[A-1] * a[W...
Traceback (most recent call last): File "/tmp/tmp9q9ij1to/tmpwa22us2z.py", line 3, in <module> H, W, A, B = [int(input()) for _ in range(4)] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/tmp9q9ij1to/tmpwa22us2z.py", line 3, in <listcomp> H, W, A, B = [int(input()) for _ in range(4)] ...
s037529268
p04040
u986399983
1491421884
Python
Python (3.4.3)
py
Runtime Error
17
3064
334
H, W, A, B = [int(input()) for _ in range(4)] MOD = 10**9 + 7 f = [1] a = [1] for i in range(1, H+W-1): f.append((f[i-1] * i) % MOD) a.append(pow(f[i], MOD-2, MOD)) ans = 0 for i in range(B, W, 1): ans += (((f[(H-A-1)+i] * a[H-A-1] * a[i]) % MOD) * ((f[(A-1)+(W-1-i)] * a[A-1] * a[W-1-i]) % MOD)) ans %= ...
Traceback (most recent call last): File "/tmp/tmpzv0y89d6/tmpfx2lco52.py", line 1, in <module> H, W, A, B = [int(input()) for _ in range(4)] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/tmpzv0y89d6/tmpfx2lco52.py", line 1, in <listcomp> H, W, A, B = [int(input()) for _ in range(4)] ...
s072743929
p04040
u986399983
1491421838
Python
Python (3.4.3)
py
Runtime Error
17
3064
335
#H, W, A, B = [int(input()) for _ in range(4)] MOD = 10**9 + 7 f = [1] a = [1] for i in range(1, H+W-1): f.append((f[i-1] * i) % MOD) a.append(pow(f[i], MOD-2, MOD)) ans = 0 for i in range(B, W, 1): ans += (((f[(H-A-1)+i] * a[H-A-1] * a[i]) % MOD) * ((f[(A-1)+(W-1-i)] * a[A-1] * a[W-1-i]) % MOD)) ans %=...
Traceback (most recent call last): File "/tmp/tmp1h6g5bmw/tmprkfc36oo.py", line 5, in <module> for i in range(1, H+W-1): ^ NameError: name 'H' is not defined
s418307632
p04041
u871352270
1580097690
Python
PyPy3 (2.4.0)
py
Runtime Error
168
40524
420
mod = 10**9+7 N,X,Y,Z = map(int, input().split()) num = 1<<(X+Y+Z-1) ng = ((((1<<X)+1)<<Y)+1)<<(Z-1) dp = [[0]*Num for i in range(N+1)] dp[0][0] = 1 for i in range(N): for j in range(1,11): for k in range(num): K = (k*2+1)<<(j-1) if K&ng != ng: K &= Num-1 ...
Traceback (most recent call last): File "/tmp/tmp9oswrxsf/tmppzjkca8g.py", line 2, in <module> N,X,Y,Z = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s957681258
p04041
u871352270
1580097068
Python
PyPy3 (2.4.0)
py
Runtime Error
166
39888
467
mod = 10**9+7 N,X,Y,Z = map(int, input().split()) Num = 1<<(X+Y+Z-1) ng = ((((1<<X)+1)<<Y)+1)<<(Z-1) dp = [[0]*(1<<l) for i in range(N+1)] dp[0][0] = 1 for i in range(N): for j in range(1, 11): for k in range(Num): a = (k<<j)|(1<<(j-1)) if a&ng != ng: a &= Num-1 ...
Traceback (most recent call last): File "/tmp/tmpr_sys7c4/tmpvpwg4131.py", line 2, in <module> N,X,Y,Z = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s993181424
p04041
u871352270
1580096928
Python
PyPy3 (2.4.0)
py
Runtime Error
170
38256
418
mod = 10**9+7 N,X,Y,Z = map(int, input().split()) Num = 1<<(X+Y+Z-1) ng = ((((1<<X)+1)<<Y)+1)<<(Z-1) dp = [[0]*(1<<l) for i in range(N+1)] dp[0][0] = 1 for i in range(N): for j in range(1, 11): for k in range(Num): a = (k<<j)|(1<<(j-1)) if a&ng != ng: a &= Num-1 ...
Traceback (most recent call last): File "/tmp/tmpqnjke51a/tmp2ito9y52.py", line 2, in <module> N,X,Y,Z = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s283099765
p04041
u623819879
1569377668
Python
PyPy3 (2.4.0)
py
Runtime Error
187
38768
1504
from heapq import heappush, heappop from collections import deque,defaultdict,Counter import itertools from itertools import permutations,combinations import sys import bisect import string #import math #import time #import random def I(): return int(input()) def MI(): return map(int,input().split()) def LI(): ...
Traceback (most recent call last): File "/tmp/tmp8_t_iflw/tmp68msizku.py", line 33, in <module> n,X,Y,Z=MI() ^^^^^^^ ValueError: not enough values to unpack (expected 4, got 0)
s180231970
p04041
u836644468
1518752028
Python
Python (3.4.3)
py
Runtime Error
17
2940
1985
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include <iostream> #include <iomanip> #include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <algorithm> #include <string> #include <vector> #include <stack> #include <queue> #include <set> #include <map> #include <functional> #includ...
File "/tmp/tmpdks9unz6/tmpsu36v647.py", line 47 //1から10までの数列で、入れてもいいものを探す ^ SyntaxError: invalid character '、' (U+3001)
s904651657
p04042
u328207927
1542306693
Python
Python (3.4.3)
py
Runtime Error
5600
151516
278
import itertools n,k=map(int,input().strip().split()) s=[input() for i in range(n)] let=itertools.combinations for i in range(1,n+1): ss=list(let(s,i)) for x in range(n): a=len(''.join(ss[x])) if a==k: print(''.join(ss[x])) exit()
Traceback (most recent call last): File "/tmp/tmp2sed8ngt/tmpljysnirw.py", line 2, in <module> n,k=map(int,input().strip().split()) ^^^^^^^ EOFError: EOF when reading a line
s298963944
p04042
u328207927
1542300339
Python
Python (3.4.3)
py
Runtime Error
5562
151516
265
import itertools n,k=map(int,input().strip().split()) s=[input() for i in range(n)] let=itertools.combinations for i in range(1,n+1): ss=list(let(s,i)) for z in range(n): a=''.join(ss[z]) if len(a)==k: print(a) exit()
Traceback (most recent call last): File "/tmp/tmpaeigxtpu/tmpymg4tna9.py", line 2, in <module> n,k=map(int,input().strip().split()) ^^^^^^^ EOFError: EOF when reading a line
s933251258
p04042
u534783449
1469329996
Python
Python (2.7.6)
py
Runtime Error
99
7696
1019
(word_num, length) = tuple([ int(x) for x in raw_input().split() ]) words = [ raw_input() for _ in xrange(word_num) ] cache = {} def get_min_word(max_index, rest_length): key = '{}:{}'.format(max_index, rest_length) if key in cache: # print 'use_cache', key, cache[key] return cache[key] # p...
File "/tmp/tmpzwpvcs7l/tmpcit1or3a.py", line 33 print min_word ^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s760406513
p04042
u534783449
1469329481
Python
Python (2.7.6)
py
Runtime Error
145
24296
1123
(word_num, length) = tuple([ int(x) for x in raw_input().split() ]) words = [ raw_input() for _ in xrange(word_num) ] cache = {} def get_min_word(current, max_index, rest_length): key = '{}:{}:{}'.format(current, max_index, rest_length) if key in cache: # print 'use_cache', key, cache[key] retu...
File "/tmp/tmp9qawh97g/tmp60vo6ilj.py", line 34 print min_word ^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s355438358
p04042
u534783449
1469328961
Python
Python (2.7.6)
py
Runtime Error
117
14848
1094
(word_num, length) = tuple([ int(x) for x in raw_input().split() ]) words = [ raw_input() for _ in xrange(word_num) ] cache = {} def get_min_word(current, max_index, rest_length): key = '{}:{}'.format(max_index, rest_length) if key in cache: # print 'use_cache' return cache[key] # print cur...
File "/tmp/tmpsdl7m8xu/tmpno44gkkq.py", line 34 print min_word ^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s140000326
p04042
u534783449
1469328484
Python
Python (2.7.6)
py
Runtime Error
107
14688
937
(word_num, length) = tuple([ int(x) for x in raw_input().split() ]) words = [ raw_input() for _ in xrange(word_num) ] def get_min_word(current, max_index, rest_length): # print current, max_index, rest_length last = words[max_index] use_last = 'z' * rest_length + current if max_index == 0: if l...
File "/tmp/tmp1gz05d2q/tmpo418i8ri.py", line 28 print min_word ^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s996598177
p04042
u534783449
1469328225
Python
Python (2.7.6)
py
Runtime Error
1333
14704
809
(word_num, length) = tuple([ int(x) for x in raw_input().split() ]) words = [ raw_input() for _ in xrange(word_num) ] def get_min_word(current, max_index, rest_length): # print current, max_index, rest_length last = words[max_index] use_last = 'z' * rest_length + current if max_index == 0: if l...
File "/tmp/tmpam4_nsq9/tmpn4te1ubr.py", line 24 print min_word ^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s394174844
p04043
u582765213
1601514733
Python
Python (3.8.2)
py
Runtime Error
24
9156
128
a, b, c = map(int, input().split()) iroha=[a,b,c] if iroha.count(2)==5 and iroha.count(1)==7: print("YES") else: prnt("NO")
Traceback (most recent call last): File "/tmp/tmpz0mlenki/tmpy199mut_.py", line 1, in <module> a, b, c = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s704252681
p04043
u149249972
1601370231
Python
Python (3.8.2)
py
Runtime Error
25
9120
819
import math total = list(map(lambda x: int(x), input().split())) possible = list({0,1,2,3,4,5,6,7,8,9} - set(list(map(lambda x: int(x), input().split())))) yen = [int(d) for d in str(total[0])] i = 0 if yen[0] == 9 and 9 not in possible: zeros = [0] * len(yen) yen = [1] + zeros print(int(''.join(map(str, ...
Traceback (most recent call last): File "/tmp/tmp4ahkv__0/tmpvll60jwx.py", line 3, in <module> total = list(map(lambda x: int(x), input().split())) ^^^^^^^ EOFError: EOF when reading a line
s265131796
p04043
u318661636
1601296170
Python
Python (3.8.2)
py
Runtime Error
27
9068
109
a = list(map(int,input().split())) a,sort() print('YES' if a[0] == 5 and a[1] == 5 and a[2] == 7 else 'NO')
Traceback (most recent call last): File "/tmp/tmpqm0k1q6b/tmpeda8oc3t.py", line 1, in <module> a = list(map(int,input().split())) ^^^^^^^ EOFError: EOF when reading a line
s173512490
p04043
u396189676
1600962420
Python
Python (3.8.2)
py
Runtime Error
19
9132
288
#!/usr/bin/env python3 # -*- coding: utf-8 -*- a=int(input()) b=int(input()) c=int(input()) if 7 == a: if 5 == b and 5 == c: print("YES", end="\n") elif 5 == a: if (7 == b and 5 == c) or (5 == b and 7 == c): print("YES", end="\n") else: print("NO", end="\n")
Traceback (most recent call last): File "/tmp/tmpzcr2keet/tmp_1207jj7.py", line 4, in <module> a=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s648653461
p04043
u396189676
1600962341
Python
Python (3.8.2)
py
Runtime Error
25
9172
288
#!/usr/bin/env python3 # -*- coding: utf-8 -*- a=int(input()) b=int(input()) c=int(input()) if 7 == a: if 5 == b and 5 == c: print("YES", end="\n") elif 5 == a: if (7 == b and 5 == c) or (5 == b and 7 == c): print("YES", end="\n") else: print("NO", end="\n")
Traceback (most recent call last): File "/tmp/tmpcvw4va19/tmpdm_ouvd0.py", line 4, in <module> a=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s616268490
p04043
u396189676
1600962273
Python
Python (3.8.2)
py
Runtime Error
24
9124
258
#!/usr/bin/env python3 # -*- coding: utf-8 -*- a=int(input()) b=int(input()) c=int(input()) if 7 == a: if 5 == b and 5 == c: print("YES") elif 5 == a: if (7 == b and 5 == c) or (5 == b and 7 == c): print("YES") else: print("NO")
Traceback (most recent call last): File "/tmp/tmpsen3r16f/tmp72o1is_w.py", line 4, in <module> a=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s012089863
p04043
u396189676
1600962223
Python
Python (3.8.2)
py
Runtime Error
21
9172
258
#!/usr/bin/env python3 # -*- coding: utf-8 -*- a=int(input()) b=int(input()) c=int(input()) if 7 == a: if 5 == b and 5 == c: print("Yes") elif 5 == a: if (7 == b and 5 == c) or (5 == b and 7 == c): print("Yes") else: print("No")
Traceback (most recent call last): File "/tmp/tmppv8cbq6f/tmphc8mx4bp.py", line 4, in <module> a=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s344166863
p04043
u808420410
1600953290
Python
Python (3.8.2)
py
Runtime Error
24
8872
113
a, b, c = [int(x) for x in in input().split()] if sorted([a, b, c]) == [5, 5, 7]: print("YES") else: print("NO")
File "/tmp/tmpewd61e67/tmpf8wv49zd.py", line 1 a, b, c = [int(x) for x in in input().split()] ^^ SyntaxError: invalid syntax
s780921856
p04043
u344089435
1600922551
Python
Python (3.8.2)
py
Runtime Error
26
8904
121
l = [int(x) for x in input().split()] l = sorted(l) if l.count(5)==2 and l.count(7)==1: print("YES") else: print("NO"
File "/tmp/tmpiugl5xmi/tmpktubo68y.py", line 6 print("NO" ^ SyntaxError: '(' was never closed