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
s553250128
p03999
u038815010
1590328709
Python
Python (3.4.3)
py
Runtime Error
22
2940
193
s=input() d=[] n=len(s) ans=0 for i in range(1<<n): tmp=0 for j in range(n): if (i>>j)&1: ans+=int(s[tmp:j+1]) tmp=j+1 ans+=int(s[tmp:]) print(ans)
Traceback (most recent call last): File "/tmp/tmp9bdbpp88/tmpi_mwqgm3.py", line 1, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s430793400
p03999
u106778233
1589987160
Python
Python (3.4.3)
py
Runtime Error
18
3060
215
S=str(input()) n=len(S) cnt=0 for i in range(2**(n-1)): s=S for j in range(n-1): if i>>j&1: cnt+=int(s[:j+1]) s=s[j+1:] pass cnt+=int(s) print(cnt)
Traceback (most recent call last): File "/tmp/tmpa05zu10e/tmpjqf_ahaz.py", line 1, in <module> S=str(input()) ^^^^^^^ EOFError: EOF when reading a line
s634501245
p03999
u503227287
1589754028
Python
PyPy3 (2.4.0)
py
Runtime Error
182
41196
632
from sys import stdin if __name__ == "__main__": _in = [_.rstrip() for _ in stdin.readlines()] S_arr = _in[0] # type:list(int) # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv N = len(S_arr)-1 cnt = 0 for bit in range(1<<N): # bit = 0: '', 1: '+' tmp = [] pointa =...
Traceback (most recent call last): File "/tmp/tmp0rg9xy7m/tmppctzmn3e.py", line 6, in <module> S_arr = _in[0] # type:list(int) ~~~^^^ IndexError: list index out of range
s403443460
p03999
u127499732
1589492640
Python
PyPy2 (5.6.0)
py
Runtime Error
36
28396
306
def main(): s = input() n = len(s) ans = 0 for i in range(n + 1): for j in range(i + 1, n + 1): x = int(s[i:j]) p = 2 ** max(0, i - 1) q = 2 ** max(0, n - j - 1) ans += x * p * q print(ans) if __name__ == '__main__': main()
Traceback (most recent call last): File "/tmp/tmpkl2z10dr/tmpkcczyurp.py", line 15, in <module> main() File "/tmp/tmpkl2z10dr/tmpkcczyurp.py", line 2, in main s = input() ^^^^^^^ EOFError: EOF when reading a line
s947982948
p03999
u127499732
1589492399
Python
Python (2.7.6)
py
Runtime Error
10
2568
306
def main(): s = input() n = len(s) ans = 0 for i in range(n + 1): for j in range(i + 1, n + 1): x = int(s[i:j]) p = 2 ** max(0, i - 1) q = 2 ** max(0, n - j - 1) ans += x * p * q print(ans) if __name__ == '__main__': main()
Traceback (most recent call last): File "/tmp/tmpl0b3ogf5/tmpoeqh7loo.py", line 15, in <module> main() File "/tmp/tmpl0b3ogf5/tmpoeqh7loo.py", line 2, in main s = input() ^^^^^^^ EOFError: EOF when reading a line
s056815605
p03999
u588785393
1589423837
Python
Python (3.8.2)
py
Runtime Error
26
9216
563
def calc(n): if n <= 1: return 1 else: return 2 ** (n - 1) def normailze(s, n): return (n - len(s)) * '0' + s def solve(s): a = calc(len(s)) cnt = 0 n = len(s) for i in range(a): binary = normailze(bin(i)[2:], n - 1) b = s[0] f = 1 for j in...
Traceback (most recent call last): File "/tmp/tmpggs2ro5d/tmpz2qbkcdh.py", line 32, in <module> print(solve(input())) ^^^^^^^ EOFError: EOF when reading a line
s238752039
p03999
u623687794
1589411857
Python
Python (3.4.3)
py
Runtime Error
17
3060
210
import itertools s=input() ans=0 L=len(s) for sta in itertools.product(range(2),L): cut=[-1]+[i for i in range(L) if sta[i]]+[L-1] for i in range(len(cut)-1): ans+=int(s[cut[i]+1:cut[i+1]+1]) print(ans)
Traceback (most recent call last): File "/tmp/tmp3_2hi5of/tmpox3wpl_z.py", line 2, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s449688687
p03999
u691018832
1589233629
Python
Python (3.4.3)
py
Runtime Error
20
3064
507
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(10 ** 7) from itertools import product s = read().rstrip().decode() ans = 0 for bit in product(['', '+'], repeat=len(s) - 1): memo = 0 for i, (bf, af) in enumerate(zip(s, s...
Traceback (most recent call last): File "/tmp/tmpoexh7f81/tmpki_vovvx.py", line 11, in <module> for bit in product(['', '+'], repeat=len(s) - 1): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: repeat argument cannot be negative
s986934052
p03999
u094191970
1589085691
Python
Python (3.4.3)
py
Runtime Error
21
3316
461
from collections import deque n,m=map(int,input().split()) tree=[[] for i in range(n)] for i in range(m): a,b=map(int,input().split()) a-=1 b-=1 tree[a].append(b) tree[b].append(a) dist=[-1 for i in range(n)] dist[0]=0 dq=deque() dq.append(0) while dq: x=dq.popleft() if x==n-1: if dist[x]==2: ...
Traceback (most recent call last): File "/tmp/tmpgsvql_ay/tmpxrni433x.py", line 3, in <module> n,m=map(int,input().split()) ^^^^^^^ EOFError: EOF when reading a line
s986088913
p03999
u547608423
1589076942
Python
Python (3.4.3)
py
Runtime Error
20
3064
443
S=input() s=list(S) ans=0 for i in range(2**(len(s)-1)): judge=str(bin(i))[2:].rjust(len(s)-1,"0") sum=0 plus=s[0] #print(judge) for j,jud in enumerate(judge): if jud=="0": plus+=s[j+1] #print(plus) else: sum+=int(plus) plus="" ...
Traceback (most recent call last): File "/tmp/tmp87ugn0dd/tmpq_t_rdw4.py", line 1, in <module> S=input() ^^^^^^^ EOFError: EOF when reading a line
s843794955
p03999
u919025034
1588964381
Python
PyPy3 (2.4.0)
py
Runtime Error
182
39920
303
S=list(input()) ans=0 for i in range(2**(len(S)-1)): bin_i= format(i, 'b') bin_i=str(bin_i.zfill(len(S)-1)) s=0 l=int(S[0]) for j,k in enumerate(bin_i): if k=="0": l=l*10+int(S[j+1]) else: s+=l l=int(S[j+1]) if j==len(S)-2: s+=l ans+=s print(ans)
Traceback (most recent call last): File "/tmp/tmpotbr5rb_/tmp3attbhy3.py", line 1, in <module> S=list(input()) ^^^^^^^ EOFError: EOF when reading a line
s387884087
p03999
u366541443
1588495431
Python
PyPy3 (2.4.0)
py
Runtime Error
177
38384
413
ss = input() n = len(ss) s=[] for i in range(n): s.append(int(ss[i])) ans = 0 for i in range(2**(n-1)): d=[[]] bit = ValueToBits(i,n-1) for j in range(n-1): d[-1].append(s[j]) if(bit[j]==1): d.append([]) d[-1].append(s[n-1]) #print(d) for j in d: fo...
Traceback (most recent call last): File "/tmp/tmpwh20x6yh/tmpcfnzrtii.py", line 2, in <module> ss = input() ^^^^^^^ EOFError: EOF when reading a line
s577199984
p03999
u375616706
1588364339
Python
Python (3.4.3)
py
Runtime Error
18
3060
214
S = int(input()) N = len(S) ans=0 for bit in range(1<<(N-1)): f = S[0] for i in range(N-1): if bit & (1<<i): f +="+" f+=S[i+1] ans += sum(map(int,f.split("+"))) print(ans)
Traceback (most recent call last): File "/tmp/tmpgeamd6bg/tmp4cje5lxq.py", line 1, in <module> S = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s336566228
p03999
u578323547
1588292033
Python
Python (3.4.3)
py
Runtime Error
17
3064
410
patterns = [] for i in range(2**(l-1)): pattern = [''] * (l-1) for j in range(l-1): if (i >> j & 1): pattern[j] = '+' patterns.append(pattern) ans = 0 for pattern in patterns: a = s[0] for i in range(l-1): if (pattern[i] == ''): a += s[i+1] else: ...
Traceback (most recent call last): File "/tmp/tmpz2j4ou9n/tmpcrffe7z9.py", line 4, in <module> for i in range(2**(l-1)): ^ NameError: name 'l' is not defined
s533896688
p03999
u028014940
1587235333
Python
Python (3.4.3)
py
Runtime Error
18
3064
199
s = input() n = len(s) def dfs(i, f): if i == n - 1: return sum(list(map(int, f.split("+")))) return dfs(i + 1, f + s[i + 1]) + dfs(i + 1, f + "+" + s[i + 1]) print(dfs(0, s[0]))
File "/tmp/tmpn7ixmuxc/tmpaeithwep.py", line 9 return dfs(i + 1, f + s[i + 1]) + dfs(i + 1, f + "+" + s[i + 1]) TabError: inconsistent use of tabs and spaces in indentation
s594891437
p03999
u028014940
1587235188
Python
PyPy3 (2.4.0)
py
Runtime Error
179
38640
222
s = input() n = len(s) start = time.time() def dfs(i, f): if i == n - 1: return sum(list(map(int, f.split("+")))) return dfs(i + 1, f + s[i + 1]) + dfs(i + 1, f + "+" + s[i + 1]) print(dfs(0, s[0]))
Traceback (most recent call last): File "/tmp/tmp43lefagj/tmpk1867pzd.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s837516852
p03999
u672542358
1586751298
Python
Python (3.4.3)
py
Runtime Error
18
3064
162
s=input() n=len(s) def dfs(i,k): if i<n-1: return dfs(i+1,k+s[i+1])+dfs(i+1,k+"+"+s[i+1]) return sum(list(map(int,input().split("+")))) print(dfs(0,s[0]))
Traceback (most recent call last): File "/tmp/tmp902iadcd/tmp94llsp8e.py", line 1, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s390828553
p03999
u672542358
1586751264
Python
Python (3.4.3)
py
Runtime Error
17
2940
161
s=input() n=len(s) def dfs(i,k): if i<n-1: return dfs(i+1,k+s[i+1])+dfs(i+1,k+"+"+s[i+1]) return sum(list(map(int,input().split("+")))) print(dfs(0,s[0])
File "/tmp/tmprflcixed/tmp44ez5w8x.py", line 7 print(dfs(0,s[0]) ^ SyntaxError: '(' was never closed
s472357452
p03999
u708019102
1585952077
Python
Python (3.4.3)
py
Runtime Error
40
3956
428
import copy a = list(input()) n = len(a)-1 ans = 0 for i in range(2 ** n): l=[] l = copy.copy(a) dokoka = [0]*(n) for j in range(n): if ((i >> j)&1): dokoka[j] = 1 x = l.pop(0) while True: d = dokoka.pop(0) if d == 0: x += l.pop(0) else: ...
Traceback (most recent call last): File "/tmp/tmp0xcaulbf/tmpqj5o5yx3.py", line 2, in <module> a = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s326661314
p03999
u452269253
1585767158
Python
Python (3.4.3)
py
Runtime Error
27
3060
245
S = list(input()) t = 0 for n in range(2**(len(S) - 1)): f = S[0] b = bin(n)[2:] b = "0"*(len(S) - len(b) - 1) + b for a in range(len(b)): if b[a] == "1": f += "+" f += S[a+1] t += eval(f) print(t)
Traceback (most recent call last): File "/tmp/tmpogoznple/tmpw7c5s340.py", line 1, in <module> S = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s683515114
p03999
u923270446
1584563844
Python
Python (3.4.3)
py
Runtime Error
18
2940
197
def dfs(i, f): if i == len(s) - 1: return sum(list(map(int, f.split("+")))) return dfs(i + 1, f + s[i + 1]) + \ dfs(i + 1, f + "+" + s[i + 1]) s = input() print(dfs(0, s[0]))
File "/tmp/tmpo3ykvm7k/tmpm5g65gem.py", line 4 return dfs(i + 1, f + s[i + 1]) + \ ^ SyntaxError: unexpected character after line continuation character
s982335177
p03999
u923270446
1584563631
Python
Python (3.4.3)
py
Runtime Error
17
2940
192
def dfs(i, f): if i == len(s) - 1: return sum(list(map(int, f.split("+")))) return dfs(i + 1, f + s[i + 1]) + \ dfs(i + 1, f + "+" + s[i + 1]) s = input() print(dfs(0, s[0]))
File "/tmp/tmp9j7lknma/tmpxlbk64h3.py", line 4 return dfs(i + 1, f + s[i + 1]) + \ dfs(i + 1, f + "+" + s[i + 1]) ^ SyntaxError: unexpected character after line continuation character
s111668091
p03999
u934868410
1584064087
Python
Python (3.4.3)
py
Runtime Error
17
2940
220
s = input() n = len(s) ans = 0 for i in range(2**(n-1)): plus = [0] for j in range(n-1): if (i >> j) & 1 = 1: plus += [j+1] for j in range(len(plus)-1): ans += int(s[plus[j]:plus[j+1]]) print(ans)
File "/tmp/tmp1z98_zjz/tmpy4hbbpum.py", line 7 if (i >> j) & 1 = 1: ^^^^^^^^^^^^ SyntaxError: cannot assign to expression here. Maybe you meant '==' instead of '='?
s519222453
p03999
u990300472
1583888994
Python
Python (3.4.3)
py
Runtime Error
17
3064
380
S = [int(i) for i in input()] N = len(S) tens = [10**i for i in range(N)] tens.reverse() twos = [1] twos.extend(2**i for i in range(N-1)) sums = 0 all_comb = sum(twos) for i in range(N): tmp = [x*y for x, y in zip(tens[i:], twos)] exp = S[i] * sum(tmp) / sum(twos) print(exp) sums = sums + exp d...
Traceback (most recent call last): File "/tmp/tmp2iiu54q4/tmpwj_6uwj9.py", line 1, in <module> S = [int(i) for i in input()] ^^^^^^^ EOFError: EOF when reading a line
s802364105
p03999
u686036872
1583628527
Python
PyPy3 (2.4.0)
py
Runtime Error
170
38512
186
S=input() ans=0 for i in range(2**(len(S)-1)): tmp=S[0] for j in range(len(S)-1): if ((i >> j) & 1) == 1: x+="+" x+=S[j+1] ans+=eval(x) print(ans)
Traceback (most recent call last): File "/tmp/tmp5qhzdgb9/tmpyisesxni.py", line 1, in <module> S=input() ^^^^^^^ EOFError: EOF when reading a line
s416269007
p03999
u375695365
1582699421
Python
Python (3.4.3)
py
Runtime Error
19
3064
596
s=str(input()) n=len(s)-1 #print(s,n) #print(xy) bit=[]#1が正直0が嘘 ans=0 def bit_search(bit): global ans count=[] c=0 if len(bit)==n:#2**n文の組み合わせを調べる加圧10を交互に入れるためのif for i in range(n): if bit[i]==1: count.append(int(s[c:i])) c=i count.append(int(s...
Traceback (most recent call last): File "/tmp/tmp46zayhpp/tmpz28gin9f.py", line 1, in <module> s=str(input()) ^^^^^^^ EOFError: EOF when reading a line
s551019233
p03999
u736729525
1581830681
Python
PyPy3 (2.4.0)
py
Runtime Error
180
38256
444
N = int(input()) TA = [] for i in range(N): T, A = map(int, input().split()) TA.append((T, A)) T, A = TA[0] answer = T+A p = 1 prev = p pT, pA = T, A for i in range(1,N): # (T+A) * p >= prev # p >= prev/(T+A) T, A = TA[i] s = T+A p = (answer+s-1)//s p1 = (pT+T-1)//T p2 = (pA+A-1)//A...
Traceback (most recent call last): File "/tmp/tmpv1acshs6/tmp4ozi7cgt.py", line 1, in <module> N = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s023270911
p03999
u987164499
1581486624
Python
Python (3.4.3)
py
Runtime Error
2111
73460
827
from sys import stdin n = int(stdin.readline().rstrip()) li = [list(map(int,stdin.readline().rstrip().split())) for _ in range(n)] point = 0 for i in range(101): for j in range(101): flag = True kizyun = False count = 0 for a,b,c in li: if c != 0: count +=...
Traceback (most recent call last): File "/tmp/tmpb6hxflrp/tmpe4zz149c.py", line 2, in <module> n = int(stdin.readline().rstrip()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: ''
s684640252
p03999
u506287026
1580455297
Python
Python (3.4.3)
py
Runtime Error
26
3060
270
s = input() n = len(s) - 1 ans = 0 for i in range(2 ** n): tmp = '' for j in range(n): tmp += s[j] if i & 1 << j: tmp += '+' tmp += s[j+1] if '+' in tmp: ans += eval(tmp) else: ans += int(tmp) print(ans)
Traceback (most recent call last): File "/tmp/tmpqqmyb0v2/tmpe32js3qg.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s723604931
p03999
u193019328
1579651445
Python
Python (3.4.3)
py
Runtime Error
17
2940
117
a = input() sum = int(a) for i in range(len(a)): if i==0: continue sum += int(a[:i])+int(a[i+1:]) print(sum)
Traceback (most recent call last): File "/tmp/tmpl1rp4vg1/tmpff_tpae9.py", line 1, in <module> a = input() ^^^^^^^ EOFError: EOF when reading a line
s891559204
p03999
u314089899
1579310327
Python
Python (3.4.3)
py
Runtime Error
20
3064
487
#045c S = list(input()) #allは2**9=512なので全探索でOK ans = 0 for i in range(0,2**(len(S)-1)): bit = str(bin(i))[2:].zfill(len(S)-1) #print(bit,":",end="") number = int(S[0]) for j in range(len(bit)): if bit[j] == "0": number = number*10 + int(S[j+1]) else: #pr...
Traceback (most recent call last): File "/tmp/tmp45urcq2m/tmp8e2uglap.py", line 2, in <module> S = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s882139291
p03999
u947327691
1579118359
Python
Python (3.4.3)
py
Runtime Error
17
2940
2
ss
Traceback (most recent call last): File "/tmp/tmpyhsz5jjj/tmpqqj135a2.py", line 1, in <module> ss NameError: name 'ss' is not defined
s801149704
p03999
u152638361
1578549438
Python
Python (3.4.3)
py
Runtime Error
28
3060
346
S = list(input()) form = "0"+str(len(S)-1)+"b" ans = 0 for i in range(2**(len(S)-1)): b = format(i, form) eq = [S[0]] for j in range(len(b)): if b[j] == "1": sign = "+" else: sign = "" eq.append(sign) eq.append(S[j+1]) eqstr = str("".join(eq)) ans += eval(...
Traceback (most recent call last): File "/tmp/tmp0j5svhnn/tmp37dfsoce.py", line 1, in <module> S = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s737831494
p03999
u489124637
1577816499
Python
PyPy3 (2.4.0)
py
Runtime Error
161
38384
354
S = input() Ans = 0 box = [] for i in range(2 ** (len(S)-1)): # 文字の間に挿入するので、len(S)-1 for j in range((len(S)-1)): box.append(S[j]) if (i >> j) & 1: Ans += int("".join(box)) box.clear() box.append(S[-1]) Ans += int("".join(box)) box.clear() ...
Traceback (most recent call last): File "/tmp/tmpft34pcbd/tmp_ig5trjw.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s478825887
p03999
u768896740
1577415087
Python
Python (3.4.3)
py
Runtime Error
21
3064
322
a = input() ans = 0 for i in range(2**(len(a)-1)): b = format(i, 'b').zfill((len(a)-1)) li = [] num = [a[0]] for i in range(len(b)): if b[i] == '1': ans += int(''.join(num)) num = [a[i+1]] else: num.append(a[i+1]) ans += int(''.join(num)) print(an...
Traceback (most recent call last): File "/tmp/tmpm4131jg5/tmpw0xc4swi.py", line 1, in <module> a = input() ^^^^^^^ EOFError: EOF when reading a line
s289206271
p03999
u492447501
1577259111
Python
Python (3.4.3)
py
Runtime Error
22
3444
319
import sys import copy S = input() op_list = ["+"]*(len(S)-1) sum = 0 for i in range(2**len(op_list)): for j in range(len(op_list)): if (i >> j) & 1: op_list[j] = "" s = "" for k in range(len(op_list)): s = s + S[k] + op_list[k] sum = sum + eval(s) print(sum)
Traceback (most recent call last): File "/tmp/tmp74tcdst7/tmpk5niiyte.py", line 6, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s858047480
p03999
u002459665
1576729854
Python
Python (3.4.3)
py
Runtime Error
27
3064
369
def main(): S = input() lens = len(S) patterns = [] ans = 0 for i in range(2 ** (lens-1)): x = format(i, 'b').zfill(lens-1) stmt = S[0] for i, xi in enumerate(x): if xi == '1': stmt += '+' stmt += S[i+1] ans += eval(stmt) ...
Traceback (most recent call last): File "/tmp/tmpewh73_1z/tmphlz2v042.py", line 19, in <module> main() File "/tmp/tmpewh73_1z/tmphlz2v042.py", line 2, in main S = input() ^^^^^^^ EOFError: EOF when reading a line
s117374039
p03999
u002459665
1576729625
Python
Python (3.4.3)
py
Runtime Error
27
3064
407
from itertools import combinations def main(): S = input() lens = len(S) patterns = [] ans = 0 for i in range(2 ** (lens-1)): x = format(i, 'b').zfill(lens-1) stmt = S[0] for i, xi in enumerate(x): if xi == '1': stmt += '+' stmt += S...
Traceback (most recent call last): File "/tmp/tmpvdmmwut2/tmps_0prg4i.py", line 23, in <module> main() File "/tmp/tmpvdmmwut2/tmps_0prg4i.py", line 4, in main S = input() ^^^^^^^ EOFError: EOF when reading a line
s096981018
p03999
u311379832
1575270942
Python
Python (3.4.3)
py
Runtime Error
26
3064
515
S = input() p = [1] * (len(S) - 1) sumlst = [0] * len(S) ans = 0 def dfs(i): global ans if i == (len(S) - 1): tmp = '' if p[0] == 1: tmp += S[0] + '+' + S[1] else: tmp += S[0] + S[1] for i in range(1, len(p)): if p[i] == 1: tmp ...
Traceback (most recent call last): File "/tmp/tmp2ajp2jbp/tmpea84hirm.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s576365101
p03999
u457554982
1574873156
Python
Python (3.4.3)
py
Runtime Error
17
3060
238
s=list(input()) n=len(s) for i in range(2**(n-1)): ni=list(map(int,list(str(format(i,"b"))))) while len(ni)<n-1: ni.insert(0,0) siki=s[0] for j in range(n-1): if ni[j]==1: siki+="+" siki+=s[j+1] ans+=eval(siki) print(ans)
Traceback (most recent call last): File "/tmp/tmp9e1sj6pn/tmpahivvam0.py", line 1, in <module> s=list(input()) ^^^^^^^ EOFError: EOF when reading a line
s122875788
p03999
u256031597
1571365769
Python
Python (3.4.3)
py
Runtime Error
18
3064
292
Sl = list(input()) def func(n, s): n += 1 if n==len(Sl)-1: a = sum([int(i) for i in (s+Sl[n]).split("+")]) b = sum([int(i) for i in (s+"+"+Sl[n]).split("+")]) return a + b else: return func(n, s+Sl[n]) + func(n, s+"+"+Sl[n]) print(func(0, Sl[0]))
Traceback (most recent call last): File "/tmp/tmp_45boa6g/tmpvh1_dfby.py", line 1, in <module> Sl = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s467220567
p03999
u100800700
1570804819
Python
Python (3.4.3)
py
Runtime Error
17
3060
160
s=input() n=len(s) def dfs(i,x): if i==n-1: return sum(list(int,x.split('+'))) return dfs(i+1,x+s[i+1])+dfs(i+1,x+'+'+s[i+1]) print(dfs(0,s[0]))
Traceback (most recent call last): File "/tmp/tmpq_kz9lit/tmpjmi037fe.py", line 1, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s208562937
p03999
u100800700
1570804773
Python
Python (3.4.3)
py
Runtime Error
17
2940
18
print(dfs(0,s[0]))
Traceback (most recent call last): File "/tmp/tmpuii79et8/tmp30y3992g.py", line 1, in <module> print(dfs(0,s[0])) ^^^ NameError: name 'dfs' is not defined
s887403641
p03999
u829008868
1570686879
Python
Python (3.4.3)
py
Runtime Error
16
2940
180
S = input() n = lens(S) def dfs(i,k): if i == n-1: return(sum(list(map(int,f.split("+"))) return dfs(i+1,K+S[i+1])+dfs(i+1,K+"+"+S[i+1]) print(dfs(0,S[0])
File "/tmp/tmprk2nuxgm/tmpex3enx1b.py", line 7 return dfs(i+1,K+S[i+1])+dfs(i+1,K+"+"+S[i+1]) ^^^^^^ SyntaxError: invalid syntax
s607994762
p03999
u009348313
1570674246
Python
PyPy3 (2.4.0)
py
Runtime Error
215
41712
305
S = input() if len(S) == 1: print(int(S)) else: ans = 0 for i in range(1<<(len(S)-1)): SP = [] for j in range(len(S)-1): if (i>>j)&1 == 1: SP.append(j) SP += [len(S)-1] #print(SP) idx = 0 for sp in SP: ans += int(S[idx:sp+1]) idx = sp+1 print(ans)
Traceback (most recent call last): File "/tmp/tmp0qrr7na5/tmpgb6stblx.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s939329041
p03999
u100800700
1570574422
Python
Python (3.4.3)
py
Runtime Error
17
3060
169
s=input() n=len(s) def f(i,t): if i == n-1: return sum(list(map(int, t.split('+')))) return f(i+1,f+s[i+1]) + f(i+1,f+'+'+s[i+1]) print(f(0,s[0]))
Traceback (most recent call last): File "/tmp/tmp9jr4830w/tmpc353qhis.py", line 1, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s843523799
p03999
u422029490
1570222565
Python
Python (3.4.3)
py
Runtime Error
17
3060
265
s = input() sum = 0 for bit in range(1 << (len(s) - 1)): expr = s ins = 0 for i in range(len(s) - 1): ins += i if bit & 1 << i: expr = expr[:ins+1] + '+' + expr[ins+1:] ins += 1 sum += eval(expr) print(sum)
Traceback (most recent call last): File "/tmp/tmp2ey9ijp2/tmphpfnsvmz.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s418258270
p03999
u891635666
1570096855
Python
Python (3.4.3)
py
Runtime Error
27
3060
246
s = input().rstrip() n = len(s) res = 0 for i in range(2**(n - 1)): bs = bin(i)[2:].rjust(n - 1, '0') ss = s[0] for j, b in enumerate(bs, 1): if b == '1': ss += '+' ss += s[j] res += eval(ss) print(res)
Traceback (most recent call last): File "/tmp/tmpjceg0p_z/tmp659eqmx1.py", line 1, in <module> s = input().rstrip() ^^^^^^^ EOFError: EOF when reading a line
s090451741
p03999
u120386623
1569382554
Python
Python (3.4.3)
py
Runtime Error
46
5100
824
import math import sys import itertools import queue from fractions import gcd def lcm(a, b): return a * b // gcd(a, b) mod = 1000000007 if __name__ == "__main__": s = sys.stdin.readline() ans = 0 n = len(s) for i in range(2**(n-1)):#数字文字列の間に「+」を入れる/入れないの全パターン tmp=s[0]#左端の値をとってくる ...
Traceback (most recent call last): File "/tmp/tmps_h122fw/tmpxravo34y.py", line 5, in <module> from fractions import gcd ImportError: cannot import name 'gcd' from 'fractions' (/root/miniconda3/envs/sandbox-runtime/lib/python3.11/fractions.py)
s392488743
p03999
u120386623
1569382503
Python
Python (3.4.3)
py
Runtime Error
18
2940
605
s = sys.stdin.readline() ans = 0 n = len(s) for i in range(2**(n-1)):#数字文字列の間に「+」を入れる/入れないの全パターン tmp=s[0]#左端の値をとってくる for j in range(n-1):#2進数のフラグチェック if i&(1<<j):#&は論理積。jを左に一回シフトして最下位の値がiかどうかチェック。 tmp+="+"#入れる tmp+=s[j+1]#後半をつなぐ # print("tmp:",tmp) ans += eval(tmp) #eval(...
Traceback (most recent call last): File "/tmp/tmp2x8mqp9b/tmp744xfnuw.py", line 1, in <module> s = sys.stdin.readline() ^^^ NameError: name 'sys' is not defined
s726413549
p03999
u120386623
1569382377
Python
Python (3.4.3)
py
Runtime Error
63
5608
1428
""" # 標準入力取得 ## 文字列 = sys.stdin.readline().rstrip() = list(sys.stdin.readline().rstrip()) ## 数値 = int(sys.stdin.readline()) = map(int, sys.stdin.readline().split()) = list(map(int, sys.stdin.readline().split())) = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)] # 二次元配列入力 二次元マップみたいな入力のとき #...
Traceback (most recent call last): File "/tmp/tmpnwbbaubs/tmpw8rgdjs4.py", line 27, in <module> from fractions import gcd ImportError: cannot import name 'gcd' from 'fractions' (/root/miniconda3/envs/sandbox-runtime/lib/python3.11/fractions.py)
s435823588
p03999
u120386623
1569382317
Python
Python (3.4.3)
py
Runtime Error
47
5096
1428
""" # 標準入力取得 ## 文字列 = sys.stdin.readline().rstrip() = list(sys.stdin.readline().rstrip()) ## 数値 = int(sys.stdin.readline()) = map(int, sys.stdin.readline().split()) = list(map(int, sys.stdin.readline().split())) = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)] # 二次元配列入力 二次元マップみたいな入力のとき #...
Traceback (most recent call last): File "/tmp/tmpjk3vm3d1/tmp90q9t_69.py", line 27, in <module> from fractions import gcd ImportError: cannot import name 'gcd' from 'fractions' (/root/miniconda3/envs/sandbox-runtime/lib/python3.11/fractions.py)
s865708609
p03999
u433532588
1569271889
Python
Python (3.4.3)
py
Runtime Error
28
3064
615
import sys input = sys.stdin.readline sys.setrecursionlimit(2147483647) INF=float("inf") MOD=10**9+7 # A = [ int(input()) for _ in range(N) ] ############################## S = input().rstrip() l = list(S) N = len(l) def getbit(i, length): return format(i, '0' + str(length) + 'b') bits = [] for i in range(2**(N...
Traceback (most recent call last): File "/tmp/tmpfqc42yr0/tmp7pbg1upn.py", line 18, in <module> for i in range(2**(N-1)): ^^^^^^^^^^^^^^^ TypeError: 'float' object cannot be interpreted as an integer
s188451520
p03999
u360094607
1568747550
Python
Python (3.4.3)
py
Runtime Error
18
3060
375
import sys sys.setrecursionlimit(2147483647) INF=float("inf") MOD=10**9+7 input=sys.stdin.readline def resolve(): s=input() n=len(s) ans=0 from itertools import product for A in product(range(2),repeat=n-1): k=s[0] for i in range(n-1): k+='+' if A[i] else '' k...
Traceback (most recent call last): File "/tmp/tmps7bjxil2/tmpth6inrrp.py", line 18, in <module> resolve() File "/tmp/tmps7bjxil2/tmpth6inrrp.py", line 11, in resolve for A in product(range(2),repeat=n-1): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: repeat argument cannot be negative
s048564148
p03999
u440566786
1568744905
Python
PyPy3 (2.4.0)
py
Runtime Error
165
38256
374
import sys sys.setrecursionlimit(2147483647) INF=float("inf") MOD=10**9+7 input=sys.stdin.readline def resolve(): s=input() n=len(s) ans=0 from itertools import product for A in product(range(2),repeat=n-1): k=s[0] for i in range(n-1): k+='+' if A[i] else '' k...
Traceback (most recent call last): File "/tmp/tmp1sq6a5tf/tmp0e7s1v35.py", line 18, in <module> resolve() File "/tmp/tmp1sq6a5tf/tmp0e7s1v35.py", line 11, in resolve for A in product(range(2),repeat=n-1): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: repeat argument cannot be negative
s898794946
p03999
u666198201
1568467576
Python
Python (3.4.3)
py
Runtime Error
21
3060
273
S=input() total=0 for i in range(2**(len(S)-1)): a = int(S[0]) t=format(i,'b').zfill(len(S)-1) for j in range(len(t)): if t[j]=='0': a=a*10+int(S[j+1]) else: total+=a a=int(S[j+1]) total+=a print(total)
Traceback (most recent call last): File "/tmp/tmpgj0wtjc1/tmpn_101rit.py", line 1, in <module> S=input() ^^^^^^^ EOFError: EOF when reading a line
s552016769
p03999
u097317219
1568357064
Python
Python (3.4.3)
py
Runtime Error
17
3060
189
s = input() n = len(s) def dfs(i,f): if i == n: return sum(list(map(int,f.split("+")))) return dfs(i + 1, f + s[i + 1]) + \ dfs(i + 1, f + "+" + s[i + 1]) print(dfs(0,0))
Traceback (most recent call last): File "/tmp/tmp2qvtcj7p/tmpceh6x4br.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s232733382
p03999
u231122239
1566319082
Python
Python (3.4.3)
py
Runtime Error
28
3188
224
S = input() ans = 0 for i in range(2**(len(S)-1)): tmp = S[0] for j, b in enumerate(format(i, 'b').zfill(len(S)-1)): if b == '1': tmp += '+' tmp += S[j+1] ans += eval(tmp) print(ans)
Traceback (most recent call last): File "/tmp/tmpjqnfsoyv/tmpbvoyh256.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s808936163
p03999
u219086885
1566188075
Python
Python (3.4.3)
py
Runtime Error
21
3060
282
s = input() answer = 0 if len(s) == 1: print(s) for i in range(2**(len(s)-1)): f = s[0] for j,b in enumerate(str(format(i,'b').zfill(len(s)-1))): if b == '1': f += ',' f += s[j+1] answer += sum(int(i) for i in f.split(',')) print(answer)
Traceback (most recent call last): File "/tmp/tmpw1p2f30u/tmp673337oj.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s185867695
p03999
u219086885
1566187841
Python
Python (3.4.3)
py
Runtime Error
21
3060
252
s = input() answer = 0 for i in range(2**(len(s)-1)): f = s[0] for j,b in enumerate(str(format(i,'b').zfill(len(s)-1))): if b == '1': f += ',' f += s[j+1] answer += sum(int(i) for i in f.split(',')) print(answer)
Traceback (most recent call last): File "/tmp/tmpoo3wy620/tmp47mltv1l.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s325466606
p03999
u626337957
1565299208
Python
Python (3.4.3)
py
Runtime Error
18
3060
418
S = input() stack = [S] ans = int(S) checked = [] while True: str_num = stack.pop() if len(str_num) <= 1: continue for i in range(len(str_num)): str1 = str_num[:i] str2 = str_num[i:] if not str1 in checked: checked.append(str1) ans += int(str1) stack.append(str1) if not str2 ...
Traceback (most recent call last): File "/tmp/tmpagehsn5v/tmpny3zi7lc.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s741844693
p03999
u676059589
1564116886
Python
PyPy3 (2.4.0)
py
Runtime Error
304
66284
2158
from copy import * from sys import * import math import queue from collections import defaultdict,Counter,deque from fractions import Fraction as frac setrecursionlimit(1000000) #dp[i][j]: iまでからj枚えらんで和がkになるのは何通り def main(): s = input() ans = 0 for i in range(0,2**(len(s)-1)): temp = [] ix2 = base_10_to_n(i,2) ...
Traceback (most recent call last): File "/tmp/tmpxy2xb5w_/tmps2xipeky.py", line 121, in <module> main() File "/tmp/tmpxy2xb5w_/tmps2xipeky.py", line 12, in main s = input() ^^^^^^^ EOFError: EOF when reading a line
s019995912
p03999
u927534107
1561757532
Python
Python (3.4.3)
py
Runtime Error
18
3064
214
n = str(input()) a = ["","+"] l = list(itertools.product(a,repeat=len(n)-1)) l_n = list(n) ans=0 for i in l: l_a = [None]*(len(n)*2-1) l_a[::2] = l_n l_a[1::2] = i ans+=eval("".join(l_a)) print(ans)
Traceback (most recent call last): File "/tmp/tmplh53whrd/tmpuj19bt7x.py", line 1, in <module> n = str(input()) ^^^^^^^ EOFError: EOF when reading a line
s986819726
p03999
u374531474
1559410843
Python
Python (3.4.3)
py
Runtime Error
28
3060
276
S = input() N = len(S) ans = 0 for i in range(2 ** (N - 1)): bit = ('{:0' + str(N - 1) + 'b}').format(i) formula = S[0] for j in range(len(bit)): if bit[j] == '1': formula += '+' formula += S[j + 1] ans += eval(formula) print(ans)
Traceback (most recent call last): File "/tmp/tmp72kx9r6r/tmpu8a7sz9m.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s612556483
p03999
u037430802
1557194048
Python
Python (3.4.3)
py
Runtime Error
25
3064
342
S = input() ans = 0 def dfs(num_string, p): global ans if p > len(S) - 1: #終わり ans += eval(num_string) return #先頭の数字だけ扱いが微妙 if p == 0: num_string = "" + S[0] p = 1 tmp = 0 dfs(num_string + "+" + S[p], p+1) dfs(num_string + S[p], p+1) return dfs(0,0) print(ans)
Traceback (most recent call last): File "/tmp/tmp2n2mm6wp/tmp0ory5y5g.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s802602502
p03999
u655834330
1556545628
Python
PyPy3 (2.4.0)
py
Runtime Error
174
38256
541
from itertools import combinations def read_input(): s = input().strip() return s def split_and_sum(s, indice): indice_e = [0, *indice, 10] result = [] for start,end in zip(indice_e, indice_e[1:]): result.append(int(s[start:end])) return sum(result) def submit(): s = read_inpu...
Traceback (most recent call last): File "/tmp/tmph58msvog/tmp83949f70.py", line 30, in <module> submit() File "/tmp/tmph58msvog/tmp83949f70.py", line 19, in submit s = read_input() ^^^^^^^^^^^^ File "/tmp/tmph58msvog/tmp83949f70.py", line 6, in read_input s = input().strip() ^^^^^^^ EO...
s206754248
p03999
u859897687
1556194170
Python
Python (3.4.3)
py
Runtime Error
17
3064
221
n=input() m=[[]for _ in range(n)] m[0]+=[[0,int(n[0])]] for i in range(1,len(n)): a=int(n[i]) for m0,m1 in m[i-1]: m[i]+=[[m0+m1,a]] m[i]+=[[m0,m1*10+a]] ans=0 for m0,m1 in m[len(n)-1]: ans+=m0+m1 print(ans)
Traceback (most recent call last): File "/tmp/tmpnkwa3lj_/tmplstwjc7h.py", line 1, in <module> n=input() ^^^^^^^ EOFError: EOF when reading a line
s840348633
p03999
u013408661
1554472627
Python
Python (3.4.3)
py
Runtime Error
18
3060
275
n=input() ans=0 def dfs(i,flag): global ans if i!=len(n)-1: dfs(i+1,flag) dfs(i+1,flag|2**i) else: num=[] start=0 for i in range(len(n)): if flag&2**i>0: num.append(n[start:i+1]) start=i+1 ans+=sum(num) dfs(0,0) print(ans)
Traceback (most recent call last): File "/tmp/tmpe60o05uq/tmpd3n0g8z9.py", line 1, in <module> n=input() ^^^^^^^ EOFError: EOF when reading a line
s737585590
p03999
u013408661
1554472615
Python
Python (3.4.3)
py
Runtime Error
19
3064
262
n=input() ans=0 def dfs(i,flag): if i!=len(n)-1: dfs(i+1,flag) dfs(i+1,flag|2**i) else: num=[] start=0 for i in range(len(n)): if flag&2**i>0: num.append(n[start:i+1]) start=i+1 ans+=sum(num) dfs(0,0) print(ans)
Traceback (most recent call last): File "/tmp/tmpp2n3uwc3/tmp0a0i2gck.py", line 1, in <module> n=input() ^^^^^^^ EOFError: EOF when reading a line
s516481965
p03999
u706695185
1553730946
Python
Python (3.4.3)
py
Runtime Error
31
3436
528
s = list(map(int,list(input()))) if len(s) == 1: print(s[0]) exit(1) from collections import deque cands=deque([[0],[1]]) while len(cands[0]) != len(s)-1: newcands = [] for cand in cands: newcands.append(cand+[0]) newcands.append(cand+[1]) cands = newcands memo = [] while cands:...
Traceback (most recent call last): File "/tmp/tmpf2ufeh3z/tmpcasbi57m.py", line 1, in <module> s = list(map(int,list(input()))) ^^^^^^^ EOFError: EOF when reading a line
s373822142
p03999
u026155812
1551230517
Python
Python (3.4.3)
py
Runtime Error
26
3064
345
import sys S = input() if len(S) == 1: print(int(S)) sys.exit() ls = [] a = [0, 1] for i in itertools.product(a, repeat=len(S)-1): ans = 0 start = 0 for j, x in enumerate(i): if x == 1: ans += int(S[start:j+1]) start = j + 1 ans += int(S[start:len(S)]) ls.ap...
Traceback (most recent call last): File "/tmp/tmp143i8esr/tmp0j_quulu.py", line 3, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s393536443
p03999
u887207211
1550977529
Python
Python (3.4.3)
py
Runtime Error
21
3188
220
S = list(input()) cnt = 0 for i in range(1 << len(S)-1): f = S[0] for j, b in enumerate(format(i, 'b').zfill(len(S)-1)): if(b == '1'): f += '+' f += S[j+1] cnt += sum(map(int,f.split('+'))) print(cnt)
Traceback (most recent call last): File "/tmp/tmpbi9ou_ml/tmpcq_4radc.py", line 1, in <module> S = list(input()) ^^^^^^^ EOFError: EOF when reading a line
s489666007
p03999
u219607170
1549188428
Python
Python (3.4.3)
py
Runtime Error
19
3064
308
from sys import setrecursionlimit; setrecursionlimit(10**9) S = input() def res(S, A, B): if not S: B.append(sum(list(map(int, A)))) return None A += [S[0]] res(S[1:], A, B) A.pop() A[-1] += S[0] res(S[1:], A, B) return B B = res(S[1:], [S[0]], []) print(sum(B))
Traceback (most recent call last): File "/tmp/tmprlg7agra/tmpo0vonrcy.py", line 2, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s969819657
p03999
u219607170
1549188385
Python
Python (3.4.3)
py
Runtime Error
19
3064
248
S = input() def res(S, A, B): if not S: B.append(sum(list(map(int, A)))) return None A += [S[0]] res(S[1:], A, B) A.pop() A[-1] += S[0] res(S[1:], A, B) return B B = res(S[1:], [S[0]], []) print(sum(B))
Traceback (most recent call last): File "/tmp/tmpew8mfw9m/tmpj2d4r7pe.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s833378548
p03999
u079644963
1546911020
Python
Python (3.4.3)
py
Runtime Error
17
3064
344
a = input() ar = [] for i in range(3): ar.append(a[i]) n = len(ar) ret = 0 for i in range(n+1): s = "+" tmp = "" for j in range(n): if (1 & (i >> j)) == 1: tmp += ar[j] tmp += s else: tmp += ar[j] stmp = tmp.split("+") ret += sum(int(k) for k ...
Traceback (most recent call last): File "/tmp/tmpid_rbbl2/tmpw323xd16.py", line 1, in <module> a = input() ^^^^^^^ EOFError: EOF when reading a line
s569377084
p03999
u079644963
1546910902
Python
Python (3.4.3)
py
Runtime Error
18
3064
340
a = input() ar = [] for i in range(3): ar.append(a[i]) n = len(ar) ret = 0 for i in range(n+1): s = "+" tmp = "" for j in range(n): if (1 & (i >> j)) == 1: tmp += ar[j] tmp += s else: tmp += ar[j] stmp = tmp.split("+") ret += sum(int(k) for k ...
Traceback (most recent call last): File "/tmp/tmpeyqxpfeu/tmpu_rdiei4.py", line 1, in <module> a = input() ^^^^^^^ EOFError: EOF when reading a line
s759977900
p03999
u620945921
1546732444
Python
Python (3.4.3)
py
Runtime Error
89
3188
325
n=input() #print(n) mynum=2**(len(n)-1) #print(mynum) data=['','+'] x=['0']*10000 #print(x) for i in range(mynum): y=format(i, 'b') z=y.zfill(len(n)-1) x[i]=n[0] for j in range(len(z)): x[i]+=data[int(z[j])]+n[j+1] # print(x[i]) x=[eval(i) for i in x] print(n if len(n)==1 else sum(x)) #126562...
Traceback (most recent call last): File "/tmp/tmphud74l1o/tmpd3nkp0ag.py", line 1, in <module> n=input() ^^^^^^^ EOFError: EOF when reading a line
s203768949
p03999
u620945921
1546732076
Python
Python (3.4.3)
py
Runtime Error
90
3188
304
n=input() #print(n) mynum=2**(len(n)-1) #print(mynum) data=['','+'] x=['0']*10000 #print(x) for i in range(mynum): y=format(i, 'b') z=y.zfill(len(n)-1) x[i]=n[0] for j in range(len(z)): x[i]+=data[int(z[j])]+n[j+1] # print(x[i]) x=[eval(i) for i in x] print(sum(x)) #12656242944
Traceback (most recent call last): File "/tmp/tmpz8i8g41s/tmpanfv8_0h.py", line 1, in <module> n=input() ^^^^^^^ EOFError: EOF when reading a line
s798251516
p03999
u620945921
1546727433
Python
Python (3.4.3)
py
Runtime Error
87
3188
796
n=input() #print(n) data=['','+'] x=['0']*10000 #print(x) for i8 in range(2): for i7 in range(2): for i6 in range(2): for i5 in range(2): for i4 in range(2): for i3 in range(2): for i2 in range(2): for i1 in range(2): for i0 in range(2): ...
Traceback (most recent call last): File "/tmp/tmpx_2hd12a/tmp14fuijtt.py", line 1, in <module> n=input() ^^^^^^^ EOFError: EOF when reading a line
s769786240
p03999
u886274153
1546091603
Python
Python (3.4.3)
py
Runtime Error
18
2940
226
s = input() slen = len(s) kotae = 0 for i in range(2**(slen-1)): for j in range(slen-1): if i & 1<<j: si = si[:slen-j]+"+"+si[slen-j:] else: pass kotae += eval(si) print(kotae)
Traceback (most recent call last): File "/tmp/tmpx_k1bdmz/tmpd6eh9_td.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s313849792
p03999
u983918956
1545636709
Python
Python (3.4.3)
py
Runtime Error
24
3064
741
s = input() l = [s[0]] d = len(s) - 1 def operate_1(string): return string def operate_2(string): string += "+" return string # l,d は未定義注意 def bfs(list_hoge = l,depth = 0,deepest = d): queue = [] for e in list_hoge: for b in [0,1]: if b == 0: operated = operate_1(e) ...
Traceback (most recent call last): File "/tmp/tmp25uu32l4/tmpaoi0autb.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s343779629
p03999
u136869985
1542568202
Python
Python (3.4.3)
py
Runtime Error
19
3060
222
s = input() ans = 0 for i in range((len(s) - 1) ** 2): tmp = '' for j in range(len(s)): tmp += s[j] if i >> j & 1 == 1: tmp += '+' else: ans += eval(tmp) else: print(ans)
Traceback (most recent call last): File "/tmp/tmpbdzc99ou/tmpbpcyy9zt.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s487225982
p03999
u136869985
1542568127
Python
Python (3.4.3)
py
Runtime Error
18
3064
217
s = input() ans = 0 for i in range((len(s) - 1) ** 2): tmp = '' for j in range(len(s)): tmp += s[j] if i >> j & 1: tmp += '+' else: ans += eval(tmp) else: print(ans)
Traceback (most recent call last): File "/tmp/tmpig_bi65i/tmpq3zbosiu.py", line 1, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s638308110
p03999
u263933075
1541261953
Python
Python (3.4.3)
py
Runtime Error
17
2940
194
ss=input() ans=0 for i in range(2**(len(ss)-1)): temp=ss[0] for j in range(len(ss)-1): if i&(1<<j)!=0: temp+="+" temp+=ss[j+1] ans+=eval(temp) print(ans)
File "/tmp/tmpe48g_t30/tmpsuzdsa2s.py", line 3 for i in range(2**(len(ss)-1)): IndentationError: unexpected indent
s844439504
p03999
u177040005
1539561699
Python
Python (3.4.3)
py
Runtime Error
20
3064
422
S = input() ans = 0 N = 2**(len(S) - 1) for i in range(N): bit = bin(i)[2:] if len(bit) != len(S): bit = '0'*(len(S)-len(bit) - 1) + bit tmp = S[0] # print(bit) for i,b in enumerate(bit): if b == '0': tmp += S[i+1] else: ans += int(tmp) t...
Traceback (most recent call last): File "/tmp/tmpmxpyeo5k/tmp2eipcwpl.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s218468018
p03999
u102126195
1537020426
Python
Python (3.4.3)
py
Runtime Error
24
3444
519
def make(x): x = bin(x)[2:] while len(x) < len(S) - 1: x = "0" + x return list(x) S = input() a = pow(2, len(S) - 1) b = [] for i in range(0, a): b.append(make(i)) i = 0 j = 0 key = int(S[0]) snum = 1 ans = 0 for i in b: snum = 1 key = int(S[0]) for j in i: if j == "0": ...
Traceback (most recent call last): File "/tmp/tmpdgf_mcj4/tmpk5lid6mf.py", line 7, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s302490203
p03999
u787562674
1536375429
Python
Python (3.4.3)
py
Runtime Error
17
3064
432
S = input() ans = 0 count_list = [[2 ** (len(S)-1)]] for i in range(1, len(S)): if i == 1: count_list.append([2 ** (len(S)-2), 2 ** (len(S)-2)]) else: count_list.append([*count_list[i-1][:i-1], count_list[i-1][-1]//2, count_list[i-1][-1]//2]) count_list = count_list[::-1] for i in range(len(...
Traceback (most recent call last): File "/tmp/tmpcm_6du8w/tmphwasm8ek.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s519833340
p03999
u787562674
1536375379
Python
Python (3.4.3)
py
Runtime Error
17
3064
432
S = input() ans = 0 count_list = [[2 ** (len(S)-1)]] for i in range(1, len(S)): if i == 1: count_list.append([2 ** (len(S)-2), 2 ** (len(S)-2)]) else: count_list.append([*count_list[i-1][:i-1], count_list[i-1][-1]//2, count_list[i-1][-1]//2]) count_list = count_list[::-1] for i in range(len(...
Traceback (most recent call last): File "/tmp/tmpdf0a2yr6/tmpdveb2yv5.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s581639165
p03999
u073775598
1534697508
Python
Python (3.4.3)
py
Runtime Error
17
3064
429
S=str(input()) formula=[""]*(len(S)*2-1) ans=0 for i in range(len(S)*2-1): if i%2==0: formula[i]=S[i//2] place=pow(2,len(S)-1)-1 for i in range(place+1): for j in range(len(bin(i))-2): #strしたbinには0bのprefixが付く。 if int(str(bin(i))[-j-1])==1: formula[2*j+1]="+" ans+=eval(''....
Traceback (most recent call last): File "/tmp/tmp5ma9nrs4/tmpula7b6d3.py", line 1, in <module> S=str(input()) ^^^^^^^ EOFError: EOF when reading a line
s315584098
p03999
u073775598
1534697329
Python
Python (3.4.3)
py
Runtime Error
28
3064
424
S=str(input()) formula=[""]*(len(S)*2-1) ans=0 for i in range(len(S)*2-1): if i%2==0: formula[i]=S[i//2] place=pow(2,len(S)-1)-1 for i in range(place+1): for j in range(len(bin(i))-2): #strしたbinには0bのprefixが付く。 if int(str(bin(i))[-j-1])==1: formula[2*j+1]="+" ans+=eval(''....
Traceback (most recent call last): File "/tmp/tmp0j8lumea/tmpmb_n9urj.py", line 1, in <module> S=str(input()) ^^^^^^^ EOFError: EOF when reading a line
s572850320
p03999
u073775598
1534696885
Python
Python (3.4.3)
py
Runtime Error
30
3064
424
S=str(input()) formula=[""]*(len(S)*2-1) ans=0 for i in range(len(S)*2-1): if i%2==0: formula[i]=S[i//2] place=pow(2,len(S)-1)-1 for i in range(place+1): for j in range(len(bin(i))-2): #strしたbinには0bのprefixが付く。 if int(str(bin(i))[-j-1])==1: formula[2*j+1]="+" ans+=eval(''....
Traceback (most recent call last): File "/tmp/tmpk9v02flg/tmpfe2jqd3_.py", line 1, in <module> S=str(input()) ^^^^^^^ EOFError: EOF when reading a line
s325315019
p03999
u118605645
1531879987
Python
Python (3.4.3)
py
Runtime Error
30
3188
445
S = input() # 2^n-1の2進数は全組み合わせを表す combs = pow(2, len(S) - 1) total = 0 for i in range(combs): # i番目の組み合わせ(2進数) comb_i = format(i, '0' + str(len(S)) + 'b') if len(comb_i) > 1: comb_i = comb_i[1:] tmp = S[0] for j in range(len(comb_i)): b = int(comb_i[j]) if b == 1: ...
Traceback (most recent call last): File "/tmp/tmpv1h29941/tmpyhrszhc8.py", line 1, in <module> S = input() ^^^^^^^ EOFError: EOF when reading a line
s553332644
p03999
u503901534
1526621133
Python
Python (3.4.3)
py
Runtime Error
18
3064
569
n = int(input()) s = n a = int(input()) b = int(input()) c = int(input()) count = 0 ng = [a,b,c] flag = 0 while count < 100 and n != (a or b or c) and n >=4: if not (n-3 in ng): count += 1 n = n-3 elif not (n-2 in ng): count += 1 n = n-2 elif not (n-1 in ng): count +=...
Traceback (most recent call last): File "/tmp/tmph2br_kix/tmp1a26pmw1.py", line 1, in <module> n = int(input()) ^^^^^^^ EOFError: EOF when reading a line
s516623093
p03999
u863370423
1524871101
Python
Python (3.4.3)
py
Runtime Error
73
3952
484
memo = [0,0,[[10,1], [1,1]]] def lis(n): if len(memo) == n+1: return memo[n] else: l = lis(n-1) for i in range(len(l)): for j in range(len(l[i])): l[i][j] *= 10 l[i].append(1) l.append([1 for i in range(len(l[0]))]) memo.append(...
Traceback (most recent call last): File "/tmp/tmpw0taw98n/tmpx4mv1j7h.py", line 14, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s506477608
p03999
u353919145
1524870987
Python
Python (3.4.3)
py
Runtime Error
72
3956
424
def lis(n): if n == 2: return [[10,1], [1,1]] else: l = lis(n-1) for i in range(len(l)): for j in range(len(l[i])): l[i][j] *= 10 l[i].append(1) l.append([1 for i in range(len(l[0]))]) return l s = input() li = lis(len(s)) sum =...
Traceback (most recent call last): File "/tmp/tmpitshz33d/tmppw_vttnu.py", line 12, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s804145273
p03999
u583010173
1523102759
Python
Python (3.4.3)
py
Runtime Error
23
3064
862
# -*- coding: utf-8 -*- s = input() bitlist = [] #文字列の長さ-1箇所にプラスを入れるかどうかbit演算によって考える for i in range(2**(len(s)-1)): bitlist.append([int(x) for x in list(bin(i)[2::].zfill(len(s)-1))]) #print(bitlist) total = 0 for bit in bitlist: befnum = int(s[0]) #print(bit) for i, plus in enumerate(bit): if ...
Traceback (most recent call last): File "/tmp/tmpw_20zwih/tmpwwmkqsgt.py", line 3, in <module> s = input() ^^^^^^^ EOFError: EOF when reading a line
s557475076
p03999
u030726788
1520603028
Python
Python (3.4.3)
py
Runtime Error
27
3060
202
s=input() su=0 for i in range(2**(len(s)-1)): b=bin(i)[2:].zfill(len(s)-1) calcs=s[0] for j in range(len(b)): if(b[j]=="0"):calcs+=s[j+1] else:calcs+="+"+s[j+1] su+=eval(calcs) print(su)
Traceback (most recent call last): File "/tmp/tmpsk1pj8a_/tmpvpg9t2e5.py", line 1, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s700470810
p03999
u030726788
1520602999
Python
Python (3.4.3)
py
Runtime Error
17
3064
204
s=input() su=0 for i in range(2**(len(s)-1)): b=bin(i)[2:].zfill(len(s)-1) calcs=s[0] for j in range(len(b)): if(b[j]=="0"):calcs+=s[j+1] else:calcs+="+"+s[j+1] sum+=eval(calcs) print(sum)
Traceback (most recent call last): File "/tmp/tmpajjic5gy/tmpkfnswial.py", line 1, in <module> s=input() ^^^^^^^ EOFError: EOF when reading a line
s207318713
p03999
u143492911
1519939939
Python
Python (3.4.3)
py
Runtime Error
17
2940
153
s=input() count=0 for i in range(1<<len(s)-1): t="" for j s: if i%2==1: t+="+" i//=2 count+=eval(t) print(count)
File "/tmp/tmpg1o8c6j5/tmp2r9jo247.py", line 5 for j s: ^ SyntaxError: invalid syntax
s003593049
p03999
u136869985
1519787362
Python
Python (3.4.3)
py
Runtime Error
19
3064
318
def main(): s = input() ans = 0 for i in range((len(s) - 1) ** 2): tmp = "" for j in range(len(s)): tmp += s[j] if (i >> j) & 1: tmp += "+" else: ans += eval(tmp) else: print(ans) if __name__ == "__main__": main()
Traceback (most recent call last): File "/tmp/tmp1hv5jlpq/tmpbmpni5ba.py", line 16, in <module> main() File "/tmp/tmp1hv5jlpq/tmpbmpni5ba.py", line 2, in main s = input() ^^^^^^^ EOFError: EOF when reading a line