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
s967923296
p04046
u099566485
1531346590
Python
Python (3.4.3)
py
Runtime Error
184
14372
179
from scipy.special import comb h,w,a,b=map(int,input().split()) s=0 for i in range(1,h-a+1): s=s+comb(i-2+b,i-1,exact=True)*comb(w-b-1+h-i,w-b-1,exact=True) print(s%(10**9+7))
Traceback (most recent call last): File "/tmp/tmpy651oi6n/tmp5b_hqoqj.py", line 2, in <module> h,w,a,b=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s811046672
p04046
u118605645
1530978126
Python
Python (3.4.3)
py
Runtime Error
2289
319860
449
H, W, A, B = (int(i) for i in input().split()) #H, W, A, B = (10, 7, 3, 4) #H, W, A, B = (2, 3, 1, 1) def mycomb(n, k): return factorials[n] / (factorials[k] * factorials[n - k]) MOD = int(1e9 + 7) factorials = [] factorials.append(1) for i in range(1, W + H): factorials.append(factorials[i - 1] * i) r = 0 for i in range(H - A): combination = mycomb(B-1+i, B-1) * mycomb(W+H-B-i-2, W-B-1) r += int(combination % MOD) print(r)
Traceback (most recent call last): File "/tmp/tmpt_if9owf/tmpz1pffg2a.py", line 1, in <module> H, W, A, B = (int(i) for i in input().split()) ^^^^^^^ EOFError: EOF when reading a line
s406867392
p04046
u118605645
1530977972
Python
Python (3.4.3)
py
Runtime Error
2295
319860
444
H, W, A, B = (int(i) for i in input().split()) #H, W, A, B = (10, 7, 3, 4) #H, W, A, B = (2, 3, 1, 1) def mycomb(n, k): return factorials[n] / (factorials[k] * factorials[n - k]) MOD = int(1e9 + 7) factorials = [] factorials.append(1) for i in range(1, W + H): factorials.append(factorials[i - 1] * i) r = 0 for i in range(H - A): combination = mycomb(B-1+i, B-1) * mycomb(W+H-B-i-2, W-B-1) r += combination % MOD print(r)
Traceback (most recent call last): File "/tmp/tmpuye4neqk/tmptvidsy4j.py", line 1, in <module> H, W, A, B = (int(i) for i in input().split()) ^^^^^^^ EOFError: EOF when reading a line
s869620922
p04046
u329865314
1529970009
Python
Python (3.4.3)
py
Runtime Error
2134
501016
339
h,w,a,b = map(int,input().split()) dp = [[0 for _ in range(w)] for __ in range(h)] dp[0] = [1 for i in range(w)] mod = 10**9 + 7 for i in range(1,h): for j in range(w): if h-i <= a and w-j <= b: continue if j == 0: dp[i][j] = dp[i][j-1] % mod else: dp[i][j] = (dp[i][j-1] + dp[i-1][j]) % mod print(dp[h][w])
Traceback (most recent call last): File "/tmp/tmplz4xvron/tmpp1jyd2v4.py", line 1, in <module> h,w,a,b = map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s904718383
p04046
u858575800
1527035714
Python
Python (3.4.3)
py
Runtime Error
120
3912
473
isPrime = [True for i in range(100001)] isPrime[0] = False isPrime[1] = False for i in range(2, 100001): if isPrime[i]: j = 2 while i*j <= 100000: isPrime[i*j] = False j += 1 q = int(input()) que = list() for i in range(q): que.append(list(map(int, input().split()))) for a, b in que: ans = 0 for i in range(a, b+1): if isPrime[i]: if isPrime[(i+1)//2]: ans += 1 print(ans)
Traceback (most recent call last): File "/tmp/tmpdxs7psx8/tmpod8ti97g.py", line 12, in <module> q = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s478565665
p04046
u327248573
1525135673
Python
Python (3.4.3)
py
Runtime Error
764
14548
479
import numpy as np from math import factorial H, W, A, B = map(int, input().split(' ')) def nCmRemain(n, m): return ((factorial(n)/factorial(n - m))/factorial(m)) % (pow(10,9)+7) path = np.zeros((A+1, W-B), dtype=np.int) for i in range(W-B): path[0][i] = nCmRemain(H-A+B-1+i,B+i) for i in range(A+1): path[i][0] = path[0][0] for i in range(1, A+1): for j in range(1, W-B): path[i][j] = (path[i-1][j] + path[i][j-1]) % (pow(10,9)+7) print(path[A][W-B-1])
Traceback (most recent call last): File "/tmp/tmpifkqsd6y/tmptmlpbex_.py", line 3, in <module> H, W, A, B = map(int, input().split(' ')) ^^^^^^^ EOFError: EOF when reading a line
s585833246
p04046
u268793453
1524784512
Python
Python (3.4.3)
py
Runtime Error
17
3064
397
h, w, a, b = [int(i) for i in input().split()] p = 10 ** 9 + 7 s = 0 fact = [1] for i in range(1, h+w-2): fact.append(fact[i-1] * i % p) rfact = [(h+w-2) % p] for i in range(h+w-1, 0, -1): rfact.append(rfact[-1] * i % p) rfact.reverse() def comb(n, r): return fact[n]//fact[n-r]//%pfact[r]%p for i in range(w-b): s += comb(h+w-a-2-i, w-1-i) * comb(a-1+i, a-1)%p print(s%p)
File "/tmp/tmp9rpziyd9/tmp_i6jjrxw.py", line 19 return fact[n]//fact[n-r]//%pfact[r]%p ^ SyntaxError: invalid syntax
s173291530
p04046
u268793453
1524770074
Python
Python (3.4.3)
py
Runtime Error
17
3064
196
import scipy.misc as scm h, w, a, b = [int(i) for i in input().split()] p = 10 * * 9 + 7 s = 0 for i in range(w-b): s += scm.comb(h+w-a-2-i, w-1-i, 1) * scm.comb(a-1+i, a-1, 1) print(s%p)
File "/tmp/tmpqzmd1hdg/tmpduubtrmg.py", line 5 p = 10 * * 9 + 7 ^ SyntaxError: invalid syntax
s999587523
p04046
u826263061
1523840818
Python
Python (3.4.3)
py
Runtime Error
2108
21504
385
import numpy as np h, w, a, b = list(map(int, input().split())) nmod = 10**9+7 board = np.zeros((h+1, w+1), dtype=int) board[1,1] = 1 for x in range(1, h+1): for y in range(1, w+1): if x >= h-a+1 and y <= b: continue board[x,y] += board[x-1,y] + board[x,y-1] if board[x,y] >= nmod: board[x,y] = board[x,y] % nmod print(board[h,w])
Traceback (most recent call last): File "/tmp/tmpq6ohjes1/tmpr53rggup.py", line 3, in <module> h, w, a, b = list(map(int, input().split())) ^^^^^^^ EOFError: EOF when reading a line
s575051490
p04046
u621935300
1522008433
Python
Python (2.7.6)
py
Runtime Error
687
31672
540
import itertools import math H,W,A,B=map(int,raw_input().split()) mod=10**9+7 FACT={} FACT_INVERSE={} n=1 for i in range(H+W-1): if i==0: n=1 else: n=(n*i)%mod FACT[i]=n #print FACT def C(n,r): return (FACT[n]*pow(FACT[r],10**9+5 ,mod)*pow(FACT[n-r],10**9+5 ,mod)) %mod N=(H-A-1)+B M=(H-1)+(W-1)-N p=0 for i in range(H-A,H): #print N,i,M,(H-1)-i,C(N,i), C(M,(H-1)-i) p+=C(N,i)*C(M,(H-1)-i) #Count patterens via prohibited point. p=p%mod if C(N+M,(H-1))-p>=0: print C(N+M,(H-1))-p else: print C(N+M,(H-1))-p+10**9+7
File "/tmp/tmpq_wk_0fl/tmppu85wq0g.py", line 34 print C(N+M,(H-1))-p ^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s391811920
p04046
u621935300
1522007379
Python
Python (2.7.6)
py
Runtime Error
523
63900
580
import itertools import math H,W,A,B=map(int,raw_input().split()) mod=10**9+7 FACT={} FACT_INVERSE={} n=1 for i in range(H+W-1): if i==0: n=1 else: n=(n*i)%mod FACT[i]=n for x,y in FACT.items(): FACT_INVERSE[x]=pow(FACT[x],10**9+5 ,mod) def C(n,r): return (FACT[n]*FACT_INVERSE[r]*FACT_INVERSE[n-r]) %mod N=(H-A-1)+B M=(H-1)+(W-1)-N p=0 for i in range(H-A,H): #print N,i,M,(H-1)-i,C(N,i), C(M,(H-1)-i) p+=C(N,i)*C(M,(H-1)-i) #Count paterens through prohibited point. p=p%mod if C(N+M,(H-1))-p>=0: print C(N+M,(H-1))-p else: print C(N+M,(H-1))-p+10**9+7
File "/tmp/tmp2qyh0br6/tmpsy0avc9g.py", line 36 print C(N+M,(H-1))-p ^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
s091161421
p04046
u672710370
1520495063
Python
Python (3.4.3)
py
Runtime Error
835
4980
645
import sys debug_mode = True if len(sys.argv) > 1 and sys.argv[1] == "-d" else False if debug_mode: import os inf = open(os.path.basename(__file__).replace(".py", ".in")) def input(): return inf.readline() else: inf = sys.stdin # ============================================================== def main(): h, w, a, b = [int(x) for x in input().strip().split()] from math import factorial r = h - a c = w - b res = factorial(r + c) / factorial(r) * factorial(c) print(res % (10**9 + 7)) main() # ============================================================== if debug_mode: inf.close()
Traceback (most recent call last): File "/tmp/tmpmcxflih6/tmpnonu2n_h.py", line 25, in <module> main() File "/tmp/tmpmcxflih6/tmpnonu2n_h.py", line 17, in main h, w, a, b = [int(x) for x in input().strip().split()] ^^^^^^^ EOFError: EOF when reading a line
s497316864
p04047
u666550725
1601039879
Python
PyPy3 (7.3.0)
py
Runtime Error
93
68384
127
N = int(input()) A = list(map(int, input().split())) A.sort() ans = 0 for i in range(0, 2 * N + 1, 2): ans += A[i] print(ans)
Traceback (most recent call last): File "/tmp/tmpeg4bqql8/tmp0y48vx3i.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s525380249
p04047
u016844138
1600468485
Python
Python (3.8.2)
py
Runtime Error
24
8960
118
n=int(input()) arr=list(map(int,input().split())) arr=arr.sort() s=0 for i in range(0,(2*n)-1,2): s+=arr[i] print(s)
Traceback (most recent call last): File "/tmp/tmpx0xo9ist/tmp3_g87rwv.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s604076487
p04047
u468972478
1599700247
Python
Python (3.8.2)
py
Runtime Error
27
9020
116
n = int(input()) a = sorted(map(int, input().split())) s = 0 for i in range(2n-1): s += min(a[i], a[i+1]) print(s)
File "/tmp/tmp4c7s93wk/tmpp1j1olst.py", line 4 for i in range(2n-1): ^ SyntaxError: invalid decimal literal
s981238232
p04047
u336236846
1599330640
Python
Python (3.8.2)
py
Runtime Error
23
9012
872
import math import sys cin - iter(sys.stdin.read().split()); TT - int(next(cin)); for TT in range(TT) n - int(next(cin)) p - [0] + n h - [0] + n interesting - set() for i in range(n) interesting.add(p[i]) interesting.add(p[i].h[i]) interesting.add(p[i]+h[i]) allinteresting - sorted(interesting, reverse - True) dp - dict() for thisn in allinteresting: for forbidden in [0,1]: best - 0 dp[(thisn. forbidden)] - best diff - sun[i if c == 'A' else -i for c in s] print["Case s(): [)", format(TT+i, "NY"[abs[diff]) -- i] for thisn in allinteresting: for forbiddeh in [0,1] dp[(thisn. forbidden)] - best int main(){ int N 1 < 100 }; int main(){ int L 1 < 100 }; var = (N <= * 2 * 3) console.log( L + 2 - 3 ); console.log( N + 2 * 3 ); type( - 2 ); type( + 2 ); type( - 3 ); type( + 4 ); type ( + 1 ); return = 0
File "/tmp/tmpfajywo3o/tmpvv_e6g4w.py", line 22 print["Case s(): [)", format(TT+i, "NY"[abs[diff]) -- i] ^ SyntaxError: closing parenthesis ')' does not match opening parenthesis '['
s389057621
p04047
u567493268
1597553747
Python
Python (3.8.2)
py
Runtime Error
27
8932
124
k = iinput() li= input().split() li.sort() sum=0 for k in range(len(li)): if k%2==0: sum=sum+li[k] print(sum)
Traceback (most recent call last): File "/tmp/tmpne3mwphl/tmp09iiha7x.py", line 1, in <module> k = iinput() ^^^^^^ NameError: name 'iinput' is not defined. Did you mean: 'input'?
s131254454
p04047
u567493268
1597553256
Python
Python (3.8.2)
py
Runtime Error
26
9044
192
try: k=input() except EOFError: print("wtf") try: li=input() except EOFError: print("wtf2") li.sort() sum=0 for k in range(len(li)): if k%2==0: sum=sum+li[k] print(sum)
Traceback (most recent call last): File "/tmp/tmpwwncx2y3/tmp454n2l9a.py", line 12, in <module> li.sort() ^^ NameError: name 'li' is not defined
wtf wtf2
s509499974
p04047
u567493268
1597552533
Python
Python (3.8.2)
py
Runtime Error
22
8988
115
k=input() li=input() li.sort() sum=0 for k in range(len(li)): if k%2==0: sum=sum+li[k] print(sum)
Traceback (most recent call last): File "/tmp/tmpc47mi4gq/tmp3asjkjfp.py", line 1, in <module> k=input() ^^^^^^^ EOFError: EOF when reading a line
s019316700
p04047
u419764866
1596648306
Python
Python (3.8.2)
py
Runtime Error
22
8884
165
N = int(input()) list = [] for i in 2N: Li = int(input()) list.append(Li) def bbq(list): for i in range(len(list)-1): for j in range(i,len(list)):
File "/tmp/tmpkl4uspd9/tmp0gznfeer.py", line 3 for i in 2N: ^ SyntaxError: invalid decimal literal
s933900905
p04047
u353919145
1596511512
Python
Python (3.8.2)
py
Runtime Error
24
9068
99
n=int(input()) a=map(int,input().split()) ans=0 for i in range(0,2*n,2): ans+=a[i+1] print(ans)
Traceback (most recent call last): File "/tmp/tmp8m1x6ths/tmpde3o450n.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s112597968
p04047
u860843282
1595298896
Python
Python (3.8.2)
py
Runtime Error
24
9388
313
from collections import Counter n = int(input()) arr = list(map(int, input().split())) counts = Counter(arr) res = 0 for k,v in counts.items(): if v>=2: res += v//2 counts[k] = v%2 items = sorted(counts.items()) for i in range(len(items)-1): res+=min(items[i], items[i+1]) print(res)
Traceback (most recent call last): File "/tmp/tmpi904b6zs/tmp4d3o0ydx.py", line 3, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s280396540
p04047
u860843282
1595298764
Python
Python (3.8.2)
py
Runtime Error
26
9112
308
from collections import Counter n = int(input()) arr = list(map(int, input().split())) counts = Counter(arr) res = 0 for k,v in counts.items(): if v>=2: res += v//2 counts[k] = v%2 items = sorted(counts.items()) for i in range(len(items)-1): res+=min(items[i], items[i+1]) return res
File "/tmp/tmpvrgwymxu/tmp5sxjv7lg.py", line 20 return res ^^^^^^^^^^ SyntaxError: 'return' outside function
s821577378
p04047
u398988238
1594765025
Python
Python (3.8.2)
py
Runtime Error
23
9192
222
N=int(input()) array=input() L=[int(val) for val in array.split()] L=sorted(L) total=0 start=0 P=[L for val in L] for _ in range(N): total+=min(P[start],P[start+1]) P.pop(start) P.pop(start+1) start+=2 print(total)
Traceback (most recent call last): File "/tmp/tmpgheu4rze/tmplitqcbuy.py", line 1, in <module> N=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s420396881
p04047
u864276028
1592882985
Python
Python (3.8.2)
py
Runtime Error
24
9140
118
N = int(input()) L = list(map(int, input().split())) L.sort() S = 0 for i in range (0, 2*N+1, 2): S += L[i] print(S)
Traceback (most recent call last): File "/tmp/tmpc8xh3jkz/tmpkucfe1wt.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s838662080
p04047
u856671164
1592762651
Python
Python (3.8.2)
py
Runtime Error
25
9092
67
num = int(input()) li = int(input().split()) print(num) print(li)
Traceback (most recent call last): File "/tmp/tmpmq9pir57/tmpl48u0569.py", line 2, in <module> num = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s315159115
p04047
u034624359
1592429889
Python
Python (3.4.3)
py
Runtime Error
18
2940
108
N=ita(input()) A=[] A=[int(x) for x in input().split()] A.sort() k=0 for i in range(N): k+=A[2*i] print(k)
Traceback (most recent call last): File "/tmp/tmpesxfpxte/tmpg_2jrtwh.py", line 1, in <module> N=ita(input()) ^^^ NameError: name 'ita' is not defined
s665951821
p04047
u333873045
1592243942
Python
Python (3.4.3)
py
Runtime Error
17
3064
300
def pair(n,count): l=[];su=0 for i in range(0,len(n),2): sub=list() sub.append(n[i:i+2]) su=su+sub[0][0] l.append(sub) return(su) ip1=int(input()) ip2=[] for i in range(ip1*2): ip2.append(int(input())) ip2.sort() print(pair(ip2,ip1))
Traceback (most recent call last): File "/tmp/tmpa_wwzf28/tmpyl7ro61a.py", line 12, in <module> ip1=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s297588072
p04047
u657413968
1592085727
Python
Python (3.4.3)
py
Runtime Error
18
3060
318
def main(p1,p2): print(p1) print(p2) L_np = np.sort(np.array(p2)) x_total = 0 for i in range(p1): x_total += L_np[2*i] print(x_total) if __name__ == "__main__": #a = [int(input()) for i in range(5)] N = int(input()) L = [int(item) for item in input().split()] main(N,L)
Traceback (most recent call last): File "/tmp/tmpvfh21tdq/tmps9re8fc1.py", line 12, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s854036133
p04047
u662430503
1591578636
Python
Python (3.4.3)
py
Runtime Error
17
2940
400
#include <iostream> using namespace std; int main(void){ int n,i,j,ans=0; cin >>n; int l[200]; int max,tmp; while(cin>>j){ l[i] = j; i++; } cout<<endl; for(i=0;i<2*n-1;++i){ max=i; for(j=i+1;j<2*n;++j){ if(l[max]<l[j]){ max=j; } } tmp=l[max]; l[max]=l[i]; l[i]=tmp; } for(i=1;i<2*n;i=i+2){ ans+=l[i]; } cout<<ans; }
File "/tmp/tmpq65884pp/tmp74o_c1yc.py", line 2 using namespace std; ^^^^^^^^^ SyntaxError: invalid syntax
s095870176
p04047
u292454598
1589723848
Python
Python (3.4.3)
py
Runtime Error
18
2940
141
kusiyaki = int(input()) kushi = [] for i in range(kusiyaki*2): kushi.append(int(input())) kushi = sorted(kushi) print(sum(kushi[0::2]))
Traceback (most recent call last): File "/tmp/tmpqyekp0we/tmp7jmqilwd.py", line 1, in <module> kusiyaki = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s500945371
p04047
u292454598
1589722084
Python
Python (3.4.3)
py
Runtime Error
17
3064
433
kusiyaki = int(input('作りたい串焼きの本数を入力してください:')) kushi = [None] * kusiyaki * 2 i = 0 sum = 0 for kushi_length in kushi: kushi_length = input('串の長さを入力してください:') kushi[i] = int(kushi_length) i += 1 kushi = sorted(kushi) kushi_min_length = kushi[0:len(kushi):2] print(kushi) print(kushi_min_length) for length in kushi_min_length: sum += int(length) print(sum)
Traceback (most recent call last): File "/tmp/tmpsewx_qq5/tmpt_vanmkt.py", line 1, in <module> kusiyaki = int(input('作りたい串焼きの本数を入力してください:')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ EOFError: EOF when reading a line
作りたい串焼きの本数を入力してください:
s806014864
p04047
u762420987
1582924122
Python
Python (3.4.3)
py
Runtime Error
18
2940
151
N = int(input()) Llist = sorted(list(map(int, input().split())))[::-1] ans = 0 for i in range(0, 2*N): ans += min(Llist[i], Llist[i+1]) print(ans)
Traceback (most recent call last): File "/tmp/tmp7el0geg5/tmpsltk5v14.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s887744334
p04047
u328510800
1581568654
Python
Python (3.4.3)
py
Runtime Error
17
2940
30
5 100 1 2 3 14 15 58 58 58 29
File "/tmp/tmpee_ys5oa/tmpi6k8agrc.py", line 2 100 1 2 3 14 15 58 58 58 29 ^ SyntaxError: invalid syntax
s710307205
p04047
u636014233
1580717735
Python
Python (3.4.3)
py
Runtime Error
17
2940
110
N = int(input()) li = list(map(int, input().split)) li.sort() P = 0 for i in range(N): P += li[i*2] print(P)
Traceback (most recent call last): File "/tmp/tmpe09imyn7/tmp_hs7esbt.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s993948380
p04047
u000274293
1576034374
Python
Python (3.4.3)
py
Runtime Error
17
2940
52
N = int(input()) L = input().split(' ') for i in L:
File "/tmp/tmp0pa9fwe0/tmpikpfot7m.py", line 3 for i in L: IndentationError: expected an indented block after 'for' statement on line 3
s635655531
p04047
u824237520
1575556462
Python
Python (3.4.3)
py
Runtime Error
17
2940
114
n = int(n) a = list(map(int, input().split())) a.sort() ans = 0 for i in range(n): ans += a[i*2] print(ans)
Traceback (most recent call last): File "/tmp/tmp82yw953k/tmpde9992yj.py", line 1, in <module> n = int(n) ^ NameError: name 'n' is not defined
s004103608
p04047
u109617108
1572623297
Python
PyPy3 (2.4.0)
py
Runtime Error
182
38256
112
N=int(input()) L=list(map(int,input().split())) L.sort() s=0 for i in range(N): s+=min(L[2i],L[2i+1]) print(s)
File "/tmp/tmpz3qdzhid/tmpv7_fgfn1.py", line 6 s+=min(L[2i],L[2i+1]) ^ SyntaxError: invalid decimal literal
s329904741
p04047
u879870653
1570154241
Python
Python (2.7.6)
py
Runtime Error
10
2568
122
N = int(input()) L = list(map(int,input().split())) L.sort() ans = 0 for i in range(0,2*N,2) : ans += L[i] print(ans)
Traceback (most recent call last): File "/tmp/tmplto99wq7/tmpklvg83v5.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s529233422
p04047
u161318582
1569884352
Python
Python (3.4.3)
py
Runtime Error
17
2940
109
a = input() x = sorted(list(map(int,input().split()))) cnt=0 for i in range(a-1): cnt += x[2*i] print(cnt)
Traceback (most recent call last): File "/tmp/tmpcsn8sw28/tmp55sluze8.py", line 1, in <module> a = input() ^^^^^^^ EOFError: EOF when reading a line
s168606739
p04047
u161318582
1569884239
Python
Python (3.4.3)
py
Runtime Error
17
2940
106
a = input() x = sorted(list(map(int,input().split()))) cnt=0 for i in range(a): cnt += x[2*i] print(cnt)
Traceback (most recent call last): File "/tmp/tmp_4mh9ku_/tmp2xtx4r0x.py", line 1, in <module> a = input() ^^^^^^^ EOFError: EOF when reading a line
s189986491
p04047
u233747425
1568678564
Python
Python (3.4.3)
py
Runtime Error
17
2940
140
n = int(input()) L = [int(i) for i in input().split()] L.sort() ans = 0 for i in range(0, 2*N, 2): ans += min(L[i], L[i+1]) print(ans)
Traceback (most recent call last): File "/tmp/tmpoyz1jl7v/tmp79hij91o.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s197666718
p04047
u676833945
1566430936
Python
Python (3.4.3)
py
Runtime Error
17
3060
170
tN = int(input()) tA = sorted(list(map(int, input().split()))) N = len(tA) i = 0 total = 0 for x in range(N / 2): total += min(tA[2 * i], tA[2 * i + 1]) print(total)
Traceback (most recent call last): File "/tmp/tmpgup1vljd/tmpey0kwvf6.py", line 1, in <module> tN = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s915240495
p04047
u676833945
1566430846
Python
Python (3.4.3)
py
Runtime Error
17
3060
162
tN = int(input()) tA = list(map(int, input().split())) N = len(tA) i = 0 total = 0 for x in range(N / 2): total += min(tA[2 * i], tA[2 * i + 1]) print(total)
Traceback (most recent call last): File "/tmp/tmp9qyq7isd/tmpbhasyztd.py", line 1, in <module> tN = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s679727884
p04047
u933750963
1565923864
Python
Python (3.4.3)
py
Runtime Error
17
2940
47
x,y=map(int,input().split()) z=3.5*y+x print(z)
Traceback (most recent call last): File "/tmp/tmppaxa1atp/tmpwc7bpymk.py", line 1, in <module> x,y=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s569317134
p04047
u933750963
1565923818
Python
Python (3.4.3)
py
Runtime Error
17
2940
47
x,y=map(int,input().split()) z=3.5*y+x print(z)
Traceback (most recent call last): File "/tmp/tmp5h0ptmnq/tmp1nt1z7ya.py", line 1, in <module> x,y=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s705752314
p04047
u418466780
1565849978
Python
Python (3.4.3)
py
Runtime Error
21
3316
959
from collections import defaultdict def computeDist(tree, nk, i): visited = [0] * (nk[0] + 1) queue = [] visited[i] = 1 queue.append(i) dist = [0] * (nk[0] + 1) dist[i] = 0 while queue: s = queue.pop(0) for u in tree[s]: if not visited[u]: queue.append(u) visited[u] = 1 dist[u] = dist[s] + 1 return len([i for i in dist if i > nk[1] // 2]) def minimumNodesToBeRemoved(tree, nk): noOfNodesAtDistKBy2 = [0] * (nk[0] + 1) for i in range(1, nk[0] + 1): noOfNodesAtDistKBy2[i] = computeDist(tree, nk, i) return min(noOfNodesAtDistKBy2[1:]) def start(): nk = [int(i) for i in input().split()] tree = defaultdict(list) for i in range(nk[0] - 1): uv = [int(i) for i in input().split()] tree[uv[0]].append(uv[1]) tree[uv[1]].append(uv[0]) return minimumNodesToBeRemoved(tree, nk) print(start())
Traceback (most recent call last): File "/tmp/tmpkd81vype/tmpub2cmebf.py", line 35, in <module> print(start()) ^^^^^^^ File "/tmp/tmpkd81vype/tmpub2cmebf.py", line 27, in start nk = [int(i) for i in input().split()] ^^^^^^^ EOFError: EOF when reading a line
s220467221
p04047
u993493158
1565745876
Python
Python (3.4.3)
py
Runtime Error
19
2940
159
n = int(input()) L = list(map(int, input().split()) L.sort() array_L = [] for m in [i * 2 for i in range(n)]: array_L.append(L[m]) print(sum(array_L))
File "/tmp/tmp2y80imh6/tmpohwfgcum.py", line 2 L = list(map(int, input().split()) ^ SyntaxError: '(' was never closed
s077974989
p04047
u047397602
1565394680
Python
Python (3.4.3)
py
Runtime Error
1072
22020
163
import numpy as np cnt = input() arr = input() arr = map(int, arr.split(' ')) r = np.array(sorted(arr)[::-1]) print(sum([min(pair) for pair in r.reshape(5,2)]))
Traceback (most recent call last): File "/tmp/tmpa2e6z90r/tmp2187dbmi.py", line 3, in <module> cnt = input() ^^^^^^^ EOFError: EOF when reading a line
s040814645
p04047
u263830634
1563739745
Python
PyPy3 (2.4.0)
py
Runtime Error
166
38256
2340
#座標平面に落とし込んで再帰関数で無理やり計算 # import numpy as np import sys sys.setrecursionlimit(10 ** 5) N, X = map(int, input().split()) if 2 * X > N: #対称性 X = N - X #座標の作成 dp = [[-1] * (N+3)] for i in range(N+1): tmp = [-1] for j in range(N+1): if i <= j: tmp.append(0) #到達していないマス else: tmp.append(-1) #壁(範囲外) tmp.append(-1) tmp.reverse() dp.append(tmp) dp.append([-1] * (N+3)) # print (np.array(dp)) #m: 0:右へ, 1:左下へ, 2:左上へ def moving(x, y, total, m): if x == X and y == 1 and dp[x][y] == 1: #一周回ってもとの座標に戻ってきた時 # print ('D') return total if m == 0: #右に動く時 tmp = 0 while dp[x-1][y+1] == 0: #右に進める時 dp[x-1][y+1] = 1 #右進んだマスを到達したことにする tmp += 1 x -= 1 y += 1 if dp[x-1][y+1] == -1: #右側が壁の時-->左下に進む # print ('1-B') return moving(x, y, total + tmp, 1) if dp[x-1][y+1] == 1: #右側が光の線の時-->左上へ進む tmp += 1 # print ('1-C') return moving(x-1, y+1, total + tmp, 2) if m == 1: #左下へ動く時 tmp = 0 while dp[x+1][y] == 0: #左下に進める時 dp[x+1][y] = 1 tmp += 1 x += 1 if dp[x+1][y] == -1: #左下が壁の時-->左上に進む # print ('2-C') return moving(x, y, total + tmp, 2) if dp[x+1][y] == 1: #左下が光の線の時-->左上に進む tmp += 1 # print ('2-C') return moving(x+1, y, total + tmp, 2) if m == 2: #左上に動く時 tmp = 0 while dp[x][y-1] == 0: #左上に進める時 dp[x][y-1] = 1 tmp += 1 y -= 1 if dp[x][y-1] == -1: #左上が壁の時-->右に進む # print ('3-A') return moving(x, y, total + tmp, 0) if dp[x][y-1] == 1: #左上が光の線の時-->左下に進む tmp += 1 # print ('3-B') return moving(x, y-1, total + tmp, 1) X += 1 print (moving(X, 1, 0, 0)) # print (np.array(dp))
Traceback (most recent call last): File "/tmp/tmpqxrbjgm9/tmpqmlz04_2.py", line 5, in <module> N, X = map(int, input().split()) ^^^^^^^ EOFError: EOF when reading a line
s564078703
p04047
u971161994
1560628071
Python
Python (3.4.3)
py
Runtime Error
17
2940
149
N = int(input()) L =[] for i in range(N*2): guzai=int(input()) L.append(guzai) L.sort() L_even=L[0::2] goukei=sum(L_even) print(str(goukei))
Traceback (most recent call last): File "/tmp/tmpbcc1x9m7/tmp1mcyqjif.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s221093562
p04047
u971161994
1560627618
Python
Python (3.4.3)
py
Runtime Error
17
2940
122
N = int(input()) L =[] guzai=int(input()) L.append(guzai) L.sort() L_even=L[0::2] goukei=sum(L_even) print(str(goukei))
Traceback (most recent call last): File "/tmp/tmpd_so060c/tmpa55ftdg8.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s484281013
p04047
u560988566
1559965886
Python
Python (3.4.3)
py
Runtime Error
17
2940
116
n = int(input()) l = [map(int, input().split())] ans = 0 l.sort() for i in range(n): ans += l[2*i] print(ans)
Traceback (most recent call last): File "/tmp/tmpslxtbvo6/tmpwfd2q5d4.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s342698874
p04047
u305052967
1559254021
Python
Python (3.4.3)
py
Runtime Error
17
2940
114
N = int(input()) L = list(map(int, input().split())) L.sort() s = 0 for n in range(N): s += L[2*n} print(s)
File "/tmp/tmp60f61g39/tmphht47z2z.py", line 8 s += L[2*n} ^ SyntaxError: closing parenthesis '}' does not match opening parenthesis '['
s297416464
p04047
u305052967
1559253812
Python
Python (3.4.3)
py
Runtime Error
17
2940
115
N = int(input()) L = list(map(int,input().split()) L.sort() s = 0 for n in range(N): s += L[2*n] print(s)
File "/tmp/tmpktj6hsif/tmpa1631e4w.py", line 2 L = list(map(int,input().split()) ^ SyntaxError: '(' was never closed
s602627412
p04047
u305052967
1559253743
Python
Python (3.4.3)
py
Runtime Error
17
2940
110
N = input() L = list(map(int,input().split()) L.sort() s = 0 for n in range(N): s += L[2*n] print(s)
File "/tmp/tmpt5nay0jx/tmpqqc3t0yb.py", line 2 L = list(map(int,input().split()) ^ SyntaxError: '(' was never closed
s587747630
p04047
u305052967
1559253714
Python
Python (3.4.3)
py
Runtime Error
17
2940
113
N =int( input()) L = list(map(int,input().split()) L.sort s = 0 for n in range(N): s += L[2*n] print(s)
File "/tmp/tmp_c3qrpfu/tmpair8gx57.py", line 2 L = list(map(int,input().split()) ^ SyntaxError: '(' was never closed
s045552452
p04047
u305052967
1559253643
Python
Python (3.4.3)
py
Runtime Error
17
2940
105
N = input() L = list(map(int,input().split()) L.sort s = 0 for n in range(N): s += L[2*n] print(s)
File "/tmp/tmpikczcuu_/tmp6fwgol_0.py", line 2 L = list(map(int,input().split()) ^ SyntaxError: '(' was never closed
s043187364
p04047
u169639579
1557888138
Python
Python (3.4.3)
py
Runtime Error
17
2940
141
N = int(input()) s = map(int,input().split()) list(s).sort(reverse=True) sum = 0 for i in range(N): sum = sum +list(s)[2*i] print(sum)
Traceback (most recent call last): File "/tmp/tmp4h6phmqa/tmp96eotbbs.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s292103477
p04047
u169639579
1557887957
Python
Python (3.4.3)
py
Runtime Error
17
2940
120
N = int(input()) s = map(int,input().split()) s.sort() sum = 0 for i in range(N): sum = sum + s[2*i+1] print(sum)
Traceback (most recent call last): File "/tmp/tmp49y2z57e/tmp0oe_kuo5.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s663985852
p04047
u169639579
1557887904
Python
Python (3.4.3)
py
Runtime Error
17
2940
118
N = int(input()) s = map(int,input().split()) s.sort() sum = 0 for i in range(N): sum = sum + s[2*i] print(sum)
Traceback (most recent call last): File "/tmp/tmpct7v1s58/tmp0jkwgjdx.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s359938455
p04047
u169639579
1557887840
Python
Python (3.4.3)
py
Runtime Error
17
2940
130
N = int(input()) s = map(int,input().split()) s.sort(reverse=True) sum = 0 for i in range(N): sum = sum + s[2*i] print(sum)
Traceback (most recent call last): File "/tmp/tmpa31hnnyv/tmpxy0xsn4_.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s147710525
p04047
u169639579
1557887687
Python
Python (3.4.3)
py
Runtime Error
17
2940
121
N = int(input()) s = input().split() s.sort(reverse=True) sum = 0 for i in range(N): sum = sum + s[2*i] print(sum)
Traceback (most recent call last): File "/tmp/tmppsckwbwz/tmpjbwihvoe.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s454116567
p04047
u273928723
1557521411
Python
Python (3.4.3)
py
Runtime Error
18
3060
127
n=input() a=input().split() a=[int(i) for i in a] a=a.sorted() count=0 ans=0 for i in a: if count%2==0: ans+=i count+=1
Traceback (most recent call last): File "/tmp/tmpt9pllygm/tmpuz5ilv91.py", line 1, in <module> n=input() ^^^^^^^ EOFError: EOF when reading a line
s493625966
p04047
u023229441
1556683203
Python
Python (3.4.3)
py
Runtime Error
17
2940
85
n=int(input());print(sum(sorted(list(map(int,input().split())))[::2])) print("RE WA?"
File "/tmp/tmpt1r66xv9/tmp44czwu_h.py", line 2 print("RE WA?" ^ SyntaxError: '(' was never closed
s238459113
p04047
u782238920
1555850939
Python
Python (3.4.3)
py
Runtime Error
17
2940
84
b=input() a=int(input().split(" ")) sum=0 for i in a: sum=sum+i sum//=2 print(sum)
Traceback (most recent call last): File "/tmp/tmplk7h98qr/tmpwa15golf.py", line 1, in <module> b=input() ^^^^^^^ EOFError: EOF when reading a line
s007995682
p04047
u782238920
1555850887
Python
Python (3.4.3)
py
Runtime Error
17
2940
71
a=int(input().split()) sum=0 for i in a: sum=sum+i sum//=2 print(sum)
Traceback (most recent call last): File "/tmp/tmpluk9p874/tmp0mg_p7a3.py", line 1, in <module> a=int(input().split()) ^^^^^^^ EOFError: EOF when reading a line
s956852856
p04047
u655048024
1554641753
Python
Python (3.4.3)
py
Runtime Error
18
2940
129
N = int(input()) c=list(map(int, input().split())) c.sort() Max = 0 for i in range(N): K = 2*N Max = Max + c[K] print(Max)
Traceback (most recent call last): File "/tmp/tmpok4_bnnk/tmpvv4jvkkv.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s320410504
p04047
u844902298
1553831194
Python
Python (3.4.3)
py
Runtime Error
17
2940
118
n = int(input()) s = list(map(int,input().split())) s.sort() sum = 0 for i in range(0,2n,2): sum += s[i] print(sum)
File "/tmp/tmpienbru2a/tmpe9odmuil.py", line 6 for i in range(0,2n,2): ^ SyntaxError: invalid decimal literal
s184275577
p04047
u684695949
1553741095
Python
Python (3.4.3)
py
Runtime Error
17
2940
158
def f(a,b): if a==b: return 2*a elif a < b: return 2*a* + f(a,b-a) else: return 2*b + f(a-b,b) N,X = map(int,input().split(" ")) print(N+f(N-X,X))
Traceback (most recent call last): File "/tmp/tmpirhrwevl/tmpu2y8f081.py", line 10, in <module> N,X = map(int,input().split(" ")) ^^^^^^^ EOFError: EOF when reading a line
s133312272
p04047
u518042385
1553622893
Python
Python (3.4.3)
py
Runtime Error
18
2940
108
n=int(input()) l=list(map(int,input().split())) l=set(l) z=0 for i in range(n): z+=l[2*i] print(z)
Traceback (most recent call last): File "/tmp/tmp8o9539b4/tmpz0j83_kc.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s857914787
p04047
u298297089
1552430629
Python
Python (3.4.3)
py
Runtime Error
18
2940
136
num = input() num_list = list(map(int, input().split()))sort() i = 0 sum = 0 while i < num * 2: sum += num_list[i] i += 2 print(sum)
File "/tmp/tmp2txs_4c4/tmpvit55aex.py", line 2 num_list = list(map(int, input().split()))sort() ^^^^ SyntaxError: invalid syntax
s576295253
p04047
u525796732
1551769201
Python
Python (3.4.3)
py
Runtime Error
18
3064
466
def main(): n,x=map(int,input().split()) a,b=n-x,x if(a<b): a,b=b,a path_length = calc_path(a,b,n) print(path_length) def calc_path(a1,b1,c1): q , mod=divmod(a1,b1) count=0 if mod==0: c2=c1+2*b1*q-b1 return c2 else: count=count+1 c2=c1+2*b1*q a2=a1-b1*q b2=b1 if(a2<b2): a2,b2=b2,a2 return calc_path(a2,b2,c2) if __name__=='__main__': main()
Traceback (most recent call last): File "/tmp/tmp_e0r966b/tmpy4f8tz94.py", line 24, in <module> main() File "/tmp/tmp_e0r966b/tmpy4f8tz94.py", line 2, in main n,x=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s947081620
p04047
u525796732
1551768212
Python
Python (3.4.3)
py
Runtime Error
17
3064
467
def main(): n,x=map(int,input().split()) a,b=n-x,x if(a<b): a,b=b,a path_length = calc_path(a,b,n) print(path_length) def calc_path(a1,b1,c1): q , mod=divmod(a1,b1) count=0 if mod==0: c2=c1+b1*(q+1) return c2 else: count=count+1 c2=c1+b1*(q+1) a2=a1-b1*q b2=b1 if(a2<b2): a2,b2=b2,a2 return calc_path(a2,b2,c2) if __name__=='__main__': main()
Traceback (most recent call last): File "/tmp/tmpwp1zzcs8/tmpsemq0az1.py", line 24, in <module> main() File "/tmp/tmpwp1zzcs8/tmpsemq0az1.py", line 2, in main n,x=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s836937692
p04047
u033524082
1551376328
Python
Python (3.4.3)
py
Runtime Error
18
2940
226
n=int(input()) l=list(map(int,input().split())) l.sort() ans=0 for i in range(0,n/2,2): ans+=l[i] print(ans)n=int(input()) l=list(map(int,input().split())) l.sort() ans=0 for i in range([0,]n[,2]): ans+=l[i] print(ans)
File "/tmp/tmp7q67i3qe/tmpksgg9yrg.py", line 7 print(ans)n=int(input()) ^ SyntaxError: invalid syntax
s040201729
p04047
u033524082
1551375972
Python
Python (3.4.3)
py
Runtime Error
18
2940
112
n=int(input()) l=list(map(int,input().split())) l.sort() ans=0 for i in range(0,n/2,2): ans+=l[i] print(ans)
Traceback (most recent call last): File "/tmp/tmp2al8sk5f/tmpkzezqwf7.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s874033754
p04047
u201968280
1550183199
Python
Python (3.4.3)
py
Runtime Error
17
2940
175
n = int(input()) table = list(map(int,input().split())) table.sort() count = 0 for i in range(n): if i%2 = 0: count += table[i] else: pass print(count)
File "/tmp/tmp997j1r4a/tmpkxwyg7cr.py", line 6 if i%2 = 0: ^^^ SyntaxError: cannot assign to expression here. Maybe you meant '==' instead of '='?
s142733593
p04047
u201968280
1550183117
Python
Python (3.4.3)
py
Runtime Error
18
2940
179
n = int(input()) table = list(map(int,input().split())) table.sort() count = 0 for i in range(1,n+1): if i%2 = 1: count += table[i] else: pass print(count)
File "/tmp/tmpi4nafboy/tmpy4mykge2.py", line 6 if i%2 = 1: ^^^ SyntaxError: cannot assign to expression here. Maybe you meant '==' instead of '='?
s822001572
p04047
u016567570
1550025392
Python
Python (3.4.3)
py
Runtime Error
18
2940
121
#-*- coding: utf-8 -*- N = int(input()) L_list = [int(input()) for n in range(2N)] L_list.sort() print(sum(L_list[::2]))
File "/tmp/tmpe7aycgbf/tmp_mw2_8hx.py", line 3 L_list = [int(input()) for n in range(2N)] ^ SyntaxError: invalid decimal literal
s617248161
p04047
u016567570
1550025378
Python
Python (3.4.3)
py
Runtime Error
17
2940
122
#-*- coding: utf-8 -*- N = int(input()) L_list = [int(input()) for n in range(2N)] L_list.sort() print(sum(L_list[1::2]))
File "/tmp/tmpfqgh1ae8/tmp9m4y3q3n.py", line 3 L_list = [int(input()) for n in range(2N)] ^ SyntaxError: invalid decimal literal
s605778442
p04047
u740284863
1549594540
Python
Python (3.4.3)
py
Runtime Error
18
2940
76
from fractionsimport gcd n,x=map(int,input().split()) print(3*(n-gcd(n,x)))
File "/tmp/tmpmk7m7dvh/tmpvnn2zlfe.py", line 1 from fractionsimport gcd ^^^ SyntaxError: invalid syntax
s631135163
p04047
u904804404
1549251066
Python
Python (3.4.3)
py
Runtime Error
18
3060
231
def tri_len(x,y): if x== y: return x elif x < y: return tri_len(y-x,x)+2*x else: return tri_len(x-y,y)+2*y import sys sys.setrecursionlimit(100000) n,x= list(map(int,input().split(" "))) print( n+tri_len(x,n-x))
Traceback (most recent call last): File "/tmp/tmpmhz4k9oh/tmpsq0om0rg.py", line 11, in <module> n,x= list(map(int,input().split(" "))) ^^^^^^^ EOFError: EOF when reading a line
s396854922
p04047
u904804404
1549251030
Python
Python (3.4.3)
py
Runtime Error
17
3064
230
def tri_len(x,y): if x== y: return x elif x < y: return tri_len(y-x,x)+2*x else: return tri_len(x-y,y)+2*y import sys sys.setrecursionlimit(10000) n,x= list(map(int,input().split(" "))) print( n+tri_len(x,n-x))
Traceback (most recent call last): File "/tmp/tmpgyxfyvuy/tmpni9s5v21.py", line 11, in <module> n,x= list(map(int,input().split(" "))) ^^^^^^^ EOFError: EOF when reading a line
s559310751
p04047
u904804404
1549249722
Python
Python (3.4.3)
py
Runtime Error
17
2940
125
a = input() lst = input().split(" ") lst.sort() ans=0 for i in range(int(len(lst))): ans += lst[len(lst)-2*i-2] print(ans)
Traceback (most recent call last): File "/tmp/tmphkjbmi01/tmpblbx5_um.py", line 1, in <module> a = input() ^^^^^^^ EOFError: EOF when reading a line
s489605749
p04047
u942393279
1548783358
Python
Python (3.4.3)
py
Runtime Error
18
2940
251
#include<bits/stdc++.h> using namespace std; int main(){ int N; cin>>N; int d=0; int a[N*2]; for(int i=0;i<N*2;i++){ cin>>a[i]; } sort(a,a+N); for(int l=0;l<N*2;l+=2){ d+=a[l]; } cout<<d<<endl; }
File "/tmp/tmpukanq2eq/tmpnw_kaxk0.py", line 2 using namespace std; ^^^^^^^^^ SyntaxError: invalid syntax
s304691375
p04047
u416522077
1548642902
Python
Python (3.4.3)
py
Runtime Error
288
21248
499
import sys import numpy as np N_stick = int(sys.argv[1]) left = [0 for i in range(N_stick)] right = [0 for i in range(N_stick)] stuff = [ 0 for i in range(N_stick*2)] for i in range(N_stick*2): stuff[i] = sys.argv[i+2] left = [ int(stuff[2*i]) for i in range(N_stick)] right = [ int(stuff[2*i+1]) for i in range(N_stick)] total = left + right sortedlist = sorted(total) for i in range(N_stick): left[i] = sortedlist[2*i] right[i] = sortedlist[2*i+1] meat = sum(left) print(meat)
Traceback (most recent call last): File "/tmp/tmpreee7lpp/tmp6ycfcldp.py", line 4, in <module> N_stick = int(sys.argv[1]) ~~~~~~~~^^^ IndexError: list index out of range
s234847450
p04047
u190882678
1548295455
Python
Python (3.4.3)
py
Runtime Error
18
3064
532
input_word = input() input_list = input_word.split(" ") N = int(input_list[0]) K = int(input_list[1]) input_word = input() tmp_list = input_word.split(" ") input_list = [ int(i) for i in tmp_list ] while True: flag = 0 for i in range(1,N): number = input_list.index(i) number_1 = input_list.index(i+1) if number - number_1 >= K: input_list[number_1],input_list[number] = input_list[number],input_list[number_1] flag = 1 break if flag == 0: break for i in input_list: print(i)
Traceback (most recent call last): File "/tmp/tmpb00s01l1/tmpymq9e52t.py", line 1, in <module> input_word = input() ^^^^^^^ EOFError: EOF when reading a line
s662189078
p04047
u089032001
1546496520
Python
Python (3.4.3)
py
Runtime Error
19
2940
116
n = int(input()) A = list(map(int, input().split())).sort() ans = 0 for a, b in zip(A, A[1:]): ans += a print(ans)
Traceback (most recent call last): File "/tmp/tmpnmh2fij1/tmpljvtt5g4.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s736262531
p04047
u459233539
1546318834
Python
Python (3.4.3)
py
Runtime Error
19
2940
87
n=int(input()) l=sorted(list(map(int,input().split())),reverse=True) print(sum(l[1::2])
File "/tmp/tmp81nwv51o/tmpxibi39q7.py", line 3 print(sum(l[1::2]) ^ SyntaxError: '(' was never closed
s445061163
p04047
u459233539
1546318792
Python
Python (3.4.3)
py
Runtime Error
17
2940
86
n=int(input()) l=sorted(list(map(int,iput().split())),reverse=True) print(sum(l[1::2])
File "/tmp/tmpvf47vedp/tmprmkxctt_.py", line 3 print(sum(l[1::2]) ^ SyntaxError: '(' was never closed
s008080090
p04047
u459233539
1546318677
Python
Python (3.4.3)
py
Runtime Error
17
2940
85
n=int(input()) l=sorted(list(map(int,iput().split()),reverse=True) print(sum(l[1::2])
File "/tmp/tmp6s_jf8ku/tmpbcjtqwbf.py", line 3 print(sum(l[1::2]) ^ SyntaxError: '(' was never closed
s928145687
p04047
u371467115
1545852281
Python
Python (3.4.3)
py
Runtime Error
18
2940
92
n=int(input()) l=[input() for i in range(n)] l.sort() s=0 for j in l[::2]: s+=j print(s)
Traceback (most recent call last): File "/tmp/tmpzzfj2x7m/tmpi1xg8snu.py", line 1, in <module> n=int(input()) ^^^^^^^ EOFError: EOF when reading a line
s592034106
p04047
u928784113
1545058523
Python
Python (3.4.3)
py
Runtime Error
18
2940
152
# -*- coding: utf-8 -*- N = int(input()) a = [int(input()) for i in range(2*N)] L = sort(a) b = [] for i in range(2*N): b.append(a[2*i]) print(sum(b))
Traceback (most recent call last): File "/tmp/tmp7a2qyod2/tmpj3vc2hc4.py", line 2, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s357077322
p04047
u928784113
1545058490
Python
Python (3.4.3)
py
Runtime Error
18
2940
150
# -*- coding: utf-8 -*- N = int(input()) a = [int(input()) for i in range(2N)] L = sort(a) b = [] for i in range(2N): b.append(a[2*i]) print(sum(b))
File "/tmp/tmpjx6ei8or/tmpk17wd0qw.py", line 3 a = [int(input()) for i in range(2N)] ^ SyntaxError: invalid decimal literal
s316320577
p04047
u928784113
1545058461
Python
Python (3.4.3)
py
Runtime Error
18
2940
147
# -*- coding: utf-8 -*- N = int(input()) a = [int(input()) for i in range(2N)] L = sort(a) b = [] for i in range(2N) b.append(a[2*i]) print(sum(b))
File "/tmp/tmp8u539sh0/tmpkg5lxf_g.py", line 3 a = [int(input()) for i in range(2N)] ^ SyntaxError: invalid decimal literal
s950638019
p04047
u258375111
1544232681
Python
Python (3.4.3)
py
Runtime Error
18
2940
126
n = int(input()) x = list(map(int, input().split())) x.sort() ans = 0 for i range(n): ans = ans + x[i*2] print(ans)
File "/tmp/tmp8nmcxflg/tmpaiox0ra7.py", line 9 for i range(n): ^^^^^ SyntaxError: invalid syntax
s725018604
p04047
u258375111
1544232601
Python
Python (3.4.3)
py
Runtime Error
18
2940
126
n = int(input()) x = list(map(int, input().split())) x.sort() ans = 0 for i range(n): ans = ans + x[i*2] print(ans)
File "/tmp/tmpb7x_j8m7/tmpw2wtxa_5.py", line 9 for i range(n): ^^^^^ SyntaxError: invalid syntax
s855412902
p04047
u258375111
1544232584
Python
Python (3.4.3)
py
Runtime Error
17
2940
127
n = int(input()) x = list(map(int, input().split())) x.sort() ans = 0 for i range(n): ans = ans + x[i*2] print(ans)
File "/tmp/tmpsgwy8bvr/tmp8dgodcmm.py", line 9 for i range(n): ^^^^^ SyntaxError: invalid syntax
s638403161
p04047
u258375111
1544232540
Python
Python (3.4.3)
py
Runtime Error
17
2940
125
n= int(input()) x= list(map(int, input().split())) x.sort() ans = 0 for i range(n): ans = ans + x[i*2] print(ans)
File "/tmp/tmpxklv0og2/tmpp_h55wrv.py", line 9 for i range(n): ^^^^^ SyntaxError: invalid syntax
s422829839
p04047
u258375111
1544232453
Python
Python (3.4.3)
py
Runtime Error
17
2940
123
n=int(input()) x=list(map(int, input().split())) x.sort() ans = 0 for i range(n): ans = ans + x[i*2] print(ans)
File "/tmp/tmpi76g395r/tmp_56vedkc.py", line 9 for i range(n): ^^^^^ SyntaxError: invalid syntax