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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s577168772 | p04000 | u842689614 | 1566795428 | Python | Python (3.4.3) | py | Runtime Error | 827 | 58896 | 4434 | H,W,N=map(int,input().split())
ab=[list(map(int,input().split())) for i in range(N)]
ab.sort()
r_b=[0]
for i in range(1,N):
if ab[i][0]!=ab[i-1][0]:
r_b.append(i)
r_b.append(N)
ab=[ab[r_b[i]:r_b[i+1]] for i in range(len(r_b)-1)]
checked=[[[[False]*3 for k in range(3)] for j in range(len(ab[i]))] for i in ran... | /tmp/tmpr_d2m5ju/tmprf5mi0p5.py:17: SyntaxWarning: "is" with a literal. Did you mean "=="?
if N is 0:
Traceback (most recent call last):
File "/tmp/tmpr_d2m5ju/tmprf5mi0p5.py", line 1, in <module>
H,W,N=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s731808450 | p04000 | u842689614 | 1566794814 | Python | Python (3.4.3) | py | Runtime Error | 3158 | 58972 | 5013 | H,W,N=map(int,input().split())
ab=[list(map(int,input().split())) for i in range(N)]
ab.sort()
r_b=[0]
for i in range(1,N):
if ab[i][0]!=ab[i-1][0]:
r_b.append(i)
r_b.append(N)
ab=[ab[r_b[i]:r_b[i+1]] for i in range(len(r_b)-1)]
if N is 0:
ab=[]
checked=[[[[False]*3 for k in range(3)] for j in range(len(ab... | /tmp/tmpop7yj2ph/tmp4xvx4qy2.py:13: SyntaxWarning: "is" with a literal. Did you mean "=="?
if N is 0:
Traceback (most recent call last):
File "/tmp/tmpop7yj2ph/tmp4xvx4qy2.py", line 1, in <module>
H,W,N=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s182699017 | p04000 | u842689614 | 1566794392 | Python | Python (3.4.3) | py | Runtime Error | 3157 | 58932 | 4471 | H,W,N=map(int,input().split())
ab=[list(map(int,input().split())) for i in range(N)]
ab.sort()
r_b=[0]
for i in range(1,N):
if ab[i][0]!=ab[i-1][0]:
r_b.append(i)
r_b.append(N)
max_r_n=0
for i in range(1,len(r_b)):
if max_r_n<r_b[i]-r_b[i-1]:
max_r_n=r_b[i]-r_b[i-1]
ab=[ab[r_b[i]:r_b[i+1]] for i in ra... | /tmp/tmpowctjg76/tmpnygdj2ad.py:19: SyntaxWarning: "is" with a literal. Did you mean "=="?
if N is 0:
Traceback (most recent call last):
File "/tmp/tmpowctjg76/tmpnygdj2ad.py", line 1, in <module>
H,W,N=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s952968802 | p04000 | u842689614 | 1566793181 | Python | Python (3.4.3) | py | Runtime Error | 599 | 39156 | 481 | H,W,N=map(int,input().split())
ab=[list(map(int,input().split())) for i in range(N)]
ab.sort()
r_b=[0]
for i in range(1,N):
if ab[i][0]!=ab[i-1][0]:
r_b.append(i)
r_b.append(N)
max_r_n=0
for i in range(1,len(r_b)):
if max_r_n<r_b[i]-r_b[i-1]:
max_r_n=r_b[i]-r_b[i-1]
ab=[ab[r_b[i]:r_b[i+1]] for i in ra... | /tmp/tmpomymi6g3/tmpdevx6k5o.py:19: SyntaxWarning: "is" with a literal. Did you mean "=="?
if N is 0:
Traceback (most recent call last):
File "/tmp/tmpomymi6g3/tmpdevx6k5o.py", line 1, in <module>
H,W,N=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s045358458 | p04000 | u842689614 | 1566792952 | Python | Python (3.4.3) | py | Runtime Error | 834 | 58796 | 480 | H,W,N=map(int,input().split())
ab=[list(map(int,input().split())) for i in range(N)]
ab.sort()
r_b=[0]
for i in range(1,N):
if ab[i][0]!=ab[i-1][0]:
r_b.append(i)
r_b.append(N)
max_r_n=0
for i in range(1,len(r_b)):
if max_r_n<r_b[i]-r_b[i-1]:
max_r_n=r_b[i]-r_b[i-1]
ab=[ab[r_b[i]:r_b[i+1]] for i in ra... | /tmp/tmpqxchpmkh/tmpaxqgkf_i.py:19: SyntaxWarning: "is" with a literal. Did you mean "=="?
if N is 0:
Traceback (most recent call last):
File "/tmp/tmpqxchpmkh/tmpaxqgkf_i.py", line 1, in <module>
H,W,N=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s054980372 | p04000 | u619819312 | 1566716401 | Python | Python (3.4.3) | py | Runtime Error | 3167 | 322892 | 650 | from collections import defaultdict as de
h,w,n=map(int,input().split())
s=[0]*10
c=de(int)
d=[]
for i in range(n):
a,b=map(int,input().split())
c[(a,b)]=1
d.append([a,b])
for e,f in d:
for i in range(3):
for j in range(3):
if 0<=e-i and e+2-i<h:
if 0<=f-j and f+2-j<w... | Traceback (most recent call last):
File "/tmp/tmp1lqqlbge/tmp_q3b1_7y.py", line 2, in <module>
h,w,n=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s776044459 | p04000 | u200785298 | 1564715190 | Python | PyPy3 (2.4.0) | py | Runtime Error | 3243 | 998944 | 1411 | #!/usr/bin/env python3
import sys
sys.setrecursionlimit(300000)
def solve(W: int, H: int, N: int, a: "List[int]", b: "List[int]"):
ret = [0] * 10
grid = [[False] * W for _ in range(H)]
ret[0] = (H - 2) * (W - 2)
for i in range(N):
lx = max(0, a[i] - 3)
rx = min(W - 2, a[i])
ly ... | Traceback (most recent call last):
File "/tmp/tmpmubm194g/tmpqj7utc4i.py", line 49, in <module>
main()
File "/tmp/tmpmubm194g/tmpqj7utc4i.py", line 38, in main
H = int(next(tokens)) # type: int
^^^^^^^^^^^^
StopIteration
| |
s623424437 | p04000 | u310678820 | 1564186915 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 819 | import numpy as np
H, W, N = map(int, input().split())
d = 10**9+1
L = []
S = set()
for _ in range(N):
a, b = map(int, input().split())
S.add((a, b))
Map = np.zeros([5, 5], dtype = 'int')
ans = [0]*10
for i in S:
a, b = i
for i in range(-2, 3):
for j in range(-2, 3):
a1, b1 = a+i, b+... | File "/tmp/tmpr5cxtn0e/tmplxwnioeo.py", line 15
a1, b1 = a+i, b+j"""
^^^
SyntaxError: invalid syntax
| |
s501867165 | p04000 | u393512980 | 1563075928 | Python | PyPy3 (2.4.0) | py | Runtime Error | 174 | 38424 | 638 | import sys
def input():
return sys.stdin.readline()[:-1]
from collections import defaultdict
H, W, N = map(int, input().split())
square = set()
dot = defaultdict(lambda : 0)
for i in range(N):
a, b = map(lambda x: int(x)-1, input().split())
dot[[a, b]] = 1
for y in range(a-2, a+1):
for x in rang... | Traceback (most recent call last):
File "/tmp/tmpqtfkfryo/tmph9a1yc6t.py", line 5, in <module>
H, W, N = map(int, input().split())
^^^^^^^
ValueError: not enough values to unpack (expected 3, got 0)
| |
s463478101 | p04000 | u123756661 | 1562469350 | Python | PyPy3 (2.4.0) | py | Runtime Error | 3391 | 1360060 | 506 | import sys
input=sys.stdin.readline
h,w,n=map(int,input().split())
d=[[0]*(w+1) for i in range(h+1)]
t=[[0]*(w+1) for i in range(h+1)]
for i in range(n):
y,x=map(int,input().split())
d[y][x]=1
for i in range(1,h+1):
for j in range(1,w+1):
t[i][j]=t[i][j-1]
if d[i][j]==1:
t[i][j]+... | Traceback (most recent call last):
File "/tmp/tmpbbgooigx/tmpntepcis7.py", line 3, in <module>
h,w,n=map(int,input().split())
^^^^^
ValueError: not enough values to unpack (expected 3, got 0)
| |
s097340093 | p04000 | u454557108 | 1560372196 | Python | Python (3.4.3) | py | Runtime Error | 3312 | 1250664 | 564 | import numpy as np
h,w,n = map(int, input().split())
a = [0]*n
b = [0]*n
for i in range(n):
a[i],b[i] = map(int, input().split())
a[i] -= 1; b[i] -= 1
## 左上のマスを(0,0)とする
## 正方形の左上のマスを(j,i)とする
sq = [[0]*(w-2) for i in range(h-2)]
for x in range(n):
for k in range(3):
for l in range(3):
... | Traceback (most recent call last):
File "/tmp/tmpeo1vyeud/tmpogcm61yd.py", line 2, in <module>
h,w,n = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s460129160 | p04000 | u272557899 | 1558213026 | Python | Python (3.4.3) | py | Runtime Error | 1842 | 147388 | 1459 | import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools, random
from collections import deque
from heapq import heappush, heappop
sys.setrecursionlimit(10 ** 7)
ans = 0
tmp = 0
inf = 10 ** 20
INF = float("INF")
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), ... | Traceback (most recent call last):
File "/tmp/tmpgowkijyn/tmpq_bj6q9r.py", line 28, in <module>
h, w, n = wi()
^^^^^^^
ValueError: not enough values to unpack (expected 3, got 0)
| |
s133278061 | p04000 | u315485238 | 1556761151 | Python | Python (3.4.3) | py | Runtime Error | 330 | 27428 | 667 | H, W, N = list(map(int, input().split()))
AB = [list(map(int, input().split())) for _ in range(N)]
from itertools import product
S = [set() for _ in range(10)]
# S[i]: set(黒いマスをi個こ含む3*3マスの中心セル)
for a,b in AB:
for x,y in product([-1,0,1], repeat=2):
X = a+x-1
Y = b+y-1
if X<=0 or H-1<=X or Y<=0 or W-1<=... | Traceback (most recent call last):
File "/tmp/tmpk42vpdz0/tmpr0f_eeqh.py", line 1, in <module>
H, W, N = list(map(int, input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s207428143 | p04000 | u189575640 | 1556484617 | Python | Python (3.4.3) | py | Runtime Error | 2264 | 127068 | 583 | from collections import defaultdict
H,W,N = [int(n) for n in input().split()]
# N = int(input())
dxy = [[0,0],[1,0],[0,1],
[-1,0],[0,-1],[1,1],
[-1,-1], [1,-1], [-1,1]]
effdic = defaultdict(int)
for i in range(N):
a,b = [int(n)-1 for n in input().split()]
for d in dxy:
ta, tb = a+d[0], b+d[1]
i... | Traceback (most recent call last):
File "/tmp/tmpy5gldlvv/tmpzv8qf2o_.py", line 2, in <module>
H,W,N = [int(n) for n in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s230226136 | p04000 | u189575640 | 1556484072 | Python | Python (3.4.3) | py | Runtime Error | 2024 | 126796 | 696 | from sys import exit
H,W,N = [int(n) for n in input().split()]
# N = int(input())
dxy = [[0,0],[1,0],[0,1],
[-1,0],[0,-1],[1,1],
[-1,-1], [1,-1], [-1,1]]
effdic = {}
for i in range(N):
a,b = [int(n)-1 for n in input().split()]
for d in dxy:
ta, tb = a+d[0], b+d[1]
if(1 <= ta < H-1 and 1 <= tb <... | Traceback (most recent call last):
File "/tmp/tmp13ga6cnj/tmpd0zc260b.py", line 2, in <module>
H,W,N = [int(n) for n in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s751648017 | p04000 | u189575640 | 1553442008 | Python | Python (3.4.3) | py | Runtime Error | 2512 | 126788 | 995 | from sys import exit
H,W,N = [int(n) for n in input().split()]
dxy = [[1,0],[0,1],[-1,0],[0,-1],[1,-1],[-1,1],[1,1],[-1,-1],[0,0]]
# ansdic = {0:(H-2)*(W-2),1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0}
ansdic = {}
# memo = [[0 for _ in range(W-1)] for __ in range(H-1)]
# print(memo)
for i in range(N):
ab = [int(n) for n i... | Traceback (most recent call last):
File "/tmp/tmpo8txzj3i/tmp61att417.py", line 2, in <module>
H,W,N = [int(n) for n in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s344695956 | p04000 | u794173881 | 1553320306 | Python | Python (3.4.3) | py | Runtime Error | 2051 | 167124 | 631 | h,w,n = map(int,input().split())
coord = [list(map(int,input().split())) for i in range(n)]
num = {}
for i in range(n):
for j,k in [[0,0],[0,1],[0,-1],[1,0],[1,1],[1,-1],[-1,0],[-1,1],[-1,-1]]:
if not(2<=coord[i][0]+j<=h-1) or not(2<=coord[i][1]+k<=w-1):
continue
if not coord[i][0]+j in num:
num... | Traceback (most recent call last):
File "/tmp/tmpj4c8yisj/tmp780rx5fk.py", line 1, in <module>
h,w,n = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s178687519 | p04000 | u643840641 | 1552753803 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 804 | #include <bits/stdc++.h>
#define For(i, a, b) for(int (i)=(a); (i)<(b); (i)++)
#define rFor(i, a, b) for(int (i)=(a)-1; (i)>=(b); (i)--)
#define rep(i, n) For((i), 0, (n))
#define rrep(i, n) rFor((i), (n), 0)
using namespace std;
typedef pair<int, int> P;
int main(){
int h, w, n; cin >> h >> w >> n;
map<P, int... | File "/tmp/tmpx8n6mr9w/tmpuh1mhgqm.py", line 6
using namespace std;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s657408962 | p04000 | u367130284 | 1549836161 | Python | Python (3.4.3) | py | Runtime Error | 1556 | 21988 | 337 | from collections import defaultdict
import numpy as np
d=defaultdict(dict)
h,w,n=map(int,input().split())
for s in range(1,11):
d[s]=0
A=np.zeros((h,w))
for s in range(n):
a,b=map(int,input().split())
A[a-1][b-1]=1
for s in range(h-2):
for t in range(w-2):
d[int(np.sum(A[s:s+3,t:t+3]))]+=1
for k,v in d.ite... | Traceback (most recent call last):
File "/tmp/tmpy6npb51r/tmpruez0j86.py", line 4, in <module>
h,w,n=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s816586107 | p04000 | u883048396 | 1539401731 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 1261 | import sys
def 解()
iH,iW,iN = [int(_) for _ in input().split()]
aD = [[int(_) for _ in sLine.split()] for sLine in sys.stdin.readlines()]
iMax = (iH - 2) * (iW -2)
#print (iMax)
dC={}
for i in range(10):
dC[i]=0
#愚直 無理 つらい
#for i in range(1,iH -1):
# for j in range(1,iW-... | File "/tmp/tmp6h4fjtmf/tmpifxl7h08.py", line 2
def 解()
^
SyntaxError: expected ':'
| |
s825312878 | p04000 | u118605645 | 1531992794 | Python | Python (3.4.3) | py | Runtime Error | 1977 | 180032 | 556 | H, W, N = (int(i) for i in input().split())
P = []
for i in range(N):
pa, pb = input().split()
P.append((int(pa)-1, int(pb)-1))
Q = {}
for pa, pb in P:
for i in range(3):
for j in range(3):
if (pa - i >= 0) and (pb - j >= 0) and (pa - i <= H - 3) and (pb - j <= W - 3):
... | Traceback (most recent call last):
File "/tmp/tmphk2v8hka/tmpt1l8tpsu.py", line 1, in <module>
H, W, N = (int(i) for i in input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s377133963 | p04000 | u006657459 | 1531797673 | Python | Python (3.4.3) | py | Runtime Error | 3197 | 30052 | 481 | import numpy as np
from scipy.sparse import lil_matrix
from collections import defaultdict
n_rows, n_cols, N = map(int, input().split())
matrix = lil_matrix((n_rows, n_cols), dtype=np.int8)
for i in range(N):
xi, yi = map(int, input().split())
matrix[xi-1, yi-1] = 1
ret = [0]*10
for row in range(0, n_rows-2):... | Traceback (most recent call last):
File "/tmp/tmpw9kpkvd2/tmp_ahcxqr6.py", line 4, in <module>
n_rows, n_cols, N = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s273259273 | p04000 | u006657459 | 1531796154 | Python | Python (3.4.3) | py | Runtime Error | 3195 | 29984 | 603 | import numpy as np
from scipy.sparse import lil_matrix
from collections import defaultdict
n_rows, n_cols, N = map(int, input().split())
matrix = lil_matrix((n_rows, n_cols), dtype=np.int8)
for i in range(N):
xi, yi = map(int, input().split())
matrix[xi-1, yi-1] = 1
def count_black(row, col):
if row + 2 >... | Traceback (most recent call last):
File "/tmp/tmpb4dp6fp6/tmp3j387lar.py", line 4, in <module>
n_rows, n_cols, N = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s337924498 | p04000 | u268793453 | 1528414491 | Python | Python (3.4.3) | py | Runtime Error | 3328 | 1444404 | 541 | h, w, n = [int(i) for i in input().split()]
if n == 0:
for i in range(10):
print(0)
exit(0)
a, b = zip(*
[[int(i) for i in input().split()] for j in range(n)])
board = [[0]*(w+1) for i in range(h+1)]
ans = [0] * 10
ans[0] = min(0, (h-2)) * min(0, (w-2))
for a, b in zip(a, b):
for i in range(max(2, a-1)... | Traceback (most recent call last):
File "/tmp/tmpte_bne3j/tmp5mijal1z.py", line 1, in <module>
h, w, n = [int(i) for i in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s263332463 | p04000 | u268793453 | 1528414075 | Python | Python (3.4.3) | py | Runtime Error | 3338 | 1444404 | 470 | h, w, n = [int(i) for i in input().split()]
a, b = zip(*
[[int(i) for i in input().split()] for j in range(n)])
board = [[0]*(w+1) for i in range(h+1)]
ans = [0] * 10
ans[0] = (h-2) * (w-2)
for a, b in zip(a, b):
for i in range(max(2, a-1), min(h, a+2)):
for j in range(max(2, b-1), min(w, b+2)):
try:
... | Traceback (most recent call last):
File "/tmp/tmpiujd9lcs/tmpzgotdekm.py", line 1, in <module>
h, w, n = [int(i) for i in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s289139767 | p04000 | u268793453 | 1528413922 | Python | Python (3.4.3) | py | Runtime Error | 3339 | 1444404 | 468 | h, w, n = [int(i) for i in input().split()]
a, b = zip(*
[[int(i) for i in input().split()] for j in range(n)])
board = [[0]*(w+1) for i in range(h+1)]
ans = [0] * 9
ans[0] = (h-2) * (w-2)
for a, b in zip(a, b):
for i in range(max(2, a-1), min(h, a+2)):
for j in range(max(2, b-1), min(w, b+2)):
try:
... | Traceback (most recent call last):
File "/tmp/tmphz17excx/tmpp5ok84zu.py", line 1, in <module>
h, w, n = [int(i) for i in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s913880047 | p04000 | u018679195 | 1524339063 | Python | PyPy2 (5.6.0) | py | Runtime Error | 34 | 27500 | 560 | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
int w, h, n;
cin >> w >> h >> n;
map<pair<int, int>, int> cnt;
while (n--) {
int x, y;
cin >> x >> y;
for (int i = x - 3; i < x; i++)
for (int j = y - 3; j < y; j++)
if (i >= 0 && j >= 0 && i + 2... | File "/tmp/tmpxw5cfq4u/tmpzj8bu8ix.py", line 2
using namespace std;
^^^^^^^^^
SyntaxError: invalid syntax
| |
s184969682 | p04000 | u621935300 | 1521766806 | Python | Python (2.7.6) | py | Runtime Error | 3188 | 524324 | 454 | import itertools
from collections import defaultdict
H,W,N=map(int, raw_input().split())
A=[ [None for i in range(W+1) ] for j in range(H+1)]
for i in range(N):
a,b=map(int, raw_input().split())
A[a][b]=1
d=[-1,0,1]
D=list(itertools.product(d,d))
l=defaultdict(lambda: 0)
for x in range(2,H):
for y in range(2,W):... | File "/tmp/tmp1plcbwmk/tmp9xmz4w5e.py", line 26
print l[i]
^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s964423132 | p04000 | u621935300 | 1521766701 | Python | Python (2.7.6) | py | Runtime Error | 3192 | 537764 | 462 | import itertools
from collections import defaultdict
H,W,N=map(int, raw_input().split())
A=[ [None for i in range(W+1) ] for j in range(H+1)]
for i in range(N):
a,b=map(int, raw_input().split())
A[a][b]=1
d=[-1,0,1]
D=list(itertools.product(d,d))
l=defaultdict(lambda: 0)
for x in range(2,H):
for y in range(2,W):... | File "/tmp/tmpno697fvv/tmp85bivc3d.py", line 24
print l
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s059133366 | p04000 | u764600134 | 1518414093 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 1593 | # -*- coding: utf-8 -*-
"""
https://beta.atcoder.jp/contests/abc045/tasks/arc061_b
"""
import sys
from sys import stdin
input = stdin.readline
def solve(H, W, N, points):
ans = [0] * 10 # 3x3のうちマスがi個だけ黒いパタンの数
checked = set()
dx = [-2, -1, 0]
dy = [-2, -1, 0]
for x, y in points:
... | Traceback (most recent call last):
File "/tmp/tmpsdbsj_sw/tmpf273mxi0.py", line 55, in <module>
main(sys.argv[1:])
File "/tmp/tmpsdbsj_sw/tmpf273mxi0.py", line 45, in main
H, W, N = map(int, input().split())
^^^^^^^
ValueError: not enough values to unpack (expected 3, got 0)
| |
s876524329 | p04000 | u252805217 | 1487631197 | Python | Python (3.4.3) | py | Runtime Error | 3286 | 1690100 | 484 | from itertools import product as prod
h, w, n = map(int, input().split())
can = [[0] * w for _ in range(h)]
for _ in range(n):
ai, bi = map(int, input().split())
a, b = ai - 1, bi - 1
can[a][b] = 1
ans = [0] * 10
for i, j in prod(range(h-2), range(w-2)):
idx = sum(can[i][j:j+3]) + sum(can[i+1][j:j+3]... | Traceback (most recent call last):
File "/tmp/tmp_izwxqqn/tmpowe0wo7w.py", line 3, in <module>
h, w, n = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s373275966 | p04000 | u252805217 | 1487630982 | Python | Python (3.4.3) | py | Runtime Error | 3283 | 1690100 | 483 | from itertools import product as prod
h, w, n = map(int, input().split())
can = [[0] * w for _ in range(h)]
for _ in range(n):
ai, bi = map(int, input().split())
a, b = ai - 1, bi - 1
can[a][b] = 1
ans = [0] * 9
for i, j in prod(range(h-2), range(w-2)):
idx = sum(can[i][j:j+3]) + sum(can[i+1][j:j+3])... | Traceback (most recent call last):
File "/tmp/tmp5ru7fi_s/tmpv9obomq1.py", line 3, in <module>
h, w, n = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s316966817 | p04000 | u830390742 | 1473789388 | Python | Python (2.7.6) | py | Runtime Error | 27 | 2568 | 610 | H, W, N = map(int, raw_input().split())
dx = [-1, 0, 1, -1, 0, 1, -1, 0, 1]
dy = [-1, -1, -1, 0, 0, 0, 1, 1, 1]
board = {}
for i in xrange(N):
a, b = map(int, raw_input().split())
for j in xrange(9):
x, y = a+dx[j], b+dy[j]
if x <= 1 or x >= H or y <= 1 ... | File "/tmp/tmpvikhisch/tmpuznlcd6v.py", line 1
H, W, N = map(int, raw_input().split())
IndentationError: unexpected indent
| |
s722696793 | p04000 | u091855288 | 1473703265 | Python | Python (3.4.3) | py | Runtime Error | 1248 | 95484 | 842 | import numpy as np
H, W, N = list(map(int,input().split()))
counts = np.zeros(10,dtype=int)
if N == 0:
counts[0] = (H-2)*(W-2)
for jdx in range(10):
print( counts[jdx] )
quit()
A = [0] * N
B = [0] * N
M = np.zeros((H,W), dtype=int)
for idx in range(N):
A[idx], B[idx] = list(map(int,input().spli... | Traceback (most recent call last):
File "/tmp/tmpzebbnh2f/tmpotjgkk8m.py", line 3, in <module>
H, W, N = list(map(int,input().split()))
^^^^^^^
EOFError: EOF when reading a line
| |
s480068330 | p04000 | u601018334 | 1473647610 | Python | Python (3.4.3) | py | Runtime Error | 37 | 3064 | 432 | def solve():
H, W, N = list(map(int, input().split()))
a = []
for i in range(N):
a.append(list(map(int, input().split())))
board = np.zeros((H,W))
for x in a:
board[x[0]-1][x[1]-1] = 1
print(ans)
count = [0]*10
for i in range(1:H-1):
for j in range(1:W-1):
... | File "/tmp/tmp26jralc8/tmprwkf216b.py", line 13
for i in range(1:H-1):
^
SyntaxError: invalid syntax
| |
s411426831 | p04000 | u866746776 | 1473645266 | Python | Python (3.4.3) | py | Runtime Error | 2977 | 119952 | 465 | from collections import Counter
h, w, n = [int(i) for i in input().split()]
vs = []
for i in range(-1, 2):
for j in range(-1, 2):
vs.append((i,j))
cnt = []
for _ in range(n):
a, b = [int(i) for i in input().split()]
for v in vs:
aa = a + v[0]
bb = b + v[1]
if 2<=aa<=h-1 and 2<=bb<=w-1:
cnt.append(aa*h+bb... | Traceback (most recent call last):
File "/tmp/tmpejtxgeae/tmpo1qbaepr.py", line 2, in <module>
h, w, n = [int(i) for i in input().split()]
^^^^^^^
EOFError: EOF when reading a line
| |
s728454734 | p04001 | u611090896 | 1600130964 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8936 | 228 | s = input()
n = len(s-1)
total=0
for i in range(2**n):
pl=['']*n
ans=''
for j in range(n):
if ((i>>j)&1):
pl[n-1-j] = '+'
for k in range(n):
ans += s[k]+pl[k]
ans+=s[-1]
total += eval(ans)
print(total) | Traceback (most recent call last):
File "/tmp/tmpv9cjhur9/tmpb49t4dko.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s794484063 | p04001 | u956836108 | 1597878234 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9188 | 349 | # -*- coding: utf-8 -*-
s = int(input())
n = len(s) - 1
answer = 0
for i in range(2 ** n):
operation = [""] * n
for j in range(n):
if (i >> j) & 1:
operation[n - 1 -j] = "+"
formula = ""
for p_n, p_o in zip(s, operation + [""]):
formula += (p_n + p_o)
answer +=... | Traceback (most recent call last):
File "/tmp/tmp09f3ezqd/tmpn0xjhp2m.py", line 3, in <module>
s = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s056278173 | p04001 | u418826171 | 1597870028 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8872 | 1 | a | Traceback (most recent call last):
File "/tmp/tmp8mo9s2y4/tmp162g1a_r.py", line 1, in <module>
a
NameError: name 'a' is not defined
| |
s584466912 | p04001 | u521271655 | 1597435282 | Python | Python (3.8.2) | py | Runtime Error | 21 | 8924 | 260 | s = input()
for i in range(2**(len(s)-1)):
plus = [""]*(len(s))
fomula = ""
for j in range(len(s)-1):
if(i >> j & 1):
plus[j] = "+"
for k in range(len(s)):
fomula += s[k] + plus[k]
ans += eval(fomula)
print(ans) | Traceback (most recent call last):
File "/tmp/tmpy3psoo10/tmpaikpanc4.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s532178637 | p04001 | u192165179 | 1597433378 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9100 | 252 | from sys import stdin
input = stdin.readline
S = input()
n = len(S)
tot = 0
for i in range(2**(n-1)):
f = S[0]
for j in range(n-1):
if ((i >> j) & 1):
f += " "
f += S[j+1]
tot += sum(map(int, f.split(" ")))
print(tot) | Traceback (most recent call last):
File "/tmp/tmpj4ypl0bu/tmpqv_pdr_l.py", line 9, in <module>
for i in range(2**(n-1)):
^^^^^^^^^^^^^^^
TypeError: 'float' object cannot be interpreted as an integer
| |
s344116638 | p04001 | u473433753 | 1596896659 | Python | Python (3.8.2) | py | Runtime Error | 31 | 8984 | 357 | n = [int(x) for x in input()]
op_cnt = len(n) - 1
out=0
for i in range(2 ** op_cnt):
op = ["+"] * op_cnt
for j in range(op_cnt):
if ((i >> j) & 1):
op[op_cnt - 1 - j] = ""
box=""
for a,b in zip(n,op+[""]):
box+=(str(a)+b)
box=box.split('+')
ou=0
for k i... | Traceback (most recent call last):
File "/tmp/tmp9fqyk_n9/tmpbuu3tng3.py", line 1, in <module>
n = [int(x) for x in input()]
^^^^^^^
EOFError: EOF when reading a line
| |
s992572904 | p04001 | u313403396 | 1594951691 | Python | Python (3.8.2) | py | Runtime Error | 21 | 9096 | 755 | #!/usr/bin/env python3
# from typing import *
import sys
import math
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
def mystoi(S):
num = 0;
for i in range(len(S)-1, 0, -1):
num += int(S[i]) * (10**(len(S)-1-i));
return num;
S = input()
N = len(S)
ans = 0
for bit in range(2**N):
j = 0... | 0
| |
s849414166 | p04001 | u313403396 | 1594951570 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9044 | 870 | #!/usr/bin/env python3
# from typing import *
import sys
import math
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
def mystoi(S):
num = 0;
for i in range(len(S)-1, 0, -1):
num += int(S[i]) * (10**(len(S)-1-i));
return num;
def solve(S):
N = len(S)
ans = 0
for bit in range(2*... | 0
| |
s514796426 | p04001 | u557792847 | 1594776912 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9060 | 259 | S = input()
total = 0
for p in (product((0, 1), repeat=len(S)-1)):
ns = S[0]
for i, pp in enumerate(p, 1):
if pp == 0:
ns += S[i]
else:
total += int(ns)
ns = S[i]
total += int(ns)
print(total)
| Traceback (most recent call last):
File "/tmp/tmpsczl9j6q/tmpvrd917_l.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s370079550 | p04001 | u746627216 | 1594650495 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9172 | 249 |
N, M = map(int, input().split())
L = [0] * M
R = [0] * M
LR = [0] * M
for i in range(M):
L[i], R[i] = map(int, input().split())
ans = min(R) - max(L)
if ans >=0:
print(ans + 1)
else:
print(0)
#print(max(L))
#print(min(R)) | Traceback (most recent call last):
File "/tmp/tmpo8zmp47a/tmpgy_7dukc.py", line 2, in <module>
N, M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s213516320 | p04001 | u114099505 | 1594249779 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8892 | 223 |
def a(t,i):
if i= len(s)-1:
return sum(map(int,t.split('+')))
return a(t+s[i+1],i+1) + a(t+'+'+s[i+1],i+1) #関数の中に入れると最後の項でまとめて処理できる
s = input()
print(a(s[0],0)) | File "/tmp/tmpc4x1d07w/tmpskv_6cyr.py", line 3
if i= len(s)-1:
^^^^^^^^^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s151544855 | p04001 | u114099505 | 1594249753 | Python | Python (3.8.2) | py | Runtime Error | 28 | 8924 | 256 | #入力
#関数へ
#関数
#
def a(t,i):
if j = len(s)-1:
return sum(map(int,t.split('+')))
return a(t+s[i+1],i+1) + a(t+'+'+s[i+1],i+1) #関数の中に入れると最後の項でまとめて処理できる
s = input()
print(a(s[0],0)) | File "/tmp/tmpomkzgg9n/tmpm6_lnnm2.py", line 6
if j = len(s)-1:
^^^^^^^^^^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s634005364 | p04001 | u114099505 | 1593404106 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9136 | 161 | def a(t,i):
if i == n-1:
return sum(map(int,t.split()))
return a(t+s[i+1],i+1)+ a(t+"+"+s[i+1],i+1)
s = input()
n = len(s)
i=0
print(a(s[0],0))
| Traceback (most recent call last):
File "/tmp/tmpvsfmbso6/tmp3lkkosiy.py", line 6, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s727949249 | p04001 | u114099505 | 1593404066 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9140 | 153 | def a(t,i):
if i == n-1:
return sum(map(int,t.split()))
return a(t+s[i+1],i+1)+ a(t+"+"+s[i+1])
s = input()
n = len(s)
print(a(s[0],0))
| Traceback (most recent call last):
File "/tmp/tmp7pndrac4/tmp3crhlr0x.py", line 6, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s559968736 | p04001 | u114099505 | 1593404000 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9144 | 163 | def a(s,i):
if i == n-1:
return sum(map(int,s.split()))
return a(s[i]+s[i+1],i+1)+ a(s[i]+"+"+s[i+1])
s = input()
n = len(s)
i=0
print(a(s[0],0))
| Traceback (most recent call last):
File "/tmp/tmp7w_9rlox/tmp4iyu58br.py", line 6, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s406069541 | p04001 | u114099505 | 1593403922 | Python | Python (3.8.2) | py | Runtime Error | 22 | 9096 | 146 | def a(s,i):
if i == n-1:
return eval(s)
return a(s[i]+s[i+1],i+1)+ a(s[i]+"+"+s[i+1])
s = input()
n = len(s)
i=0
print(a(s[0],0)) | Traceback (most recent call last):
File "/tmp/tmpwvgxal_o/tmpoil31566.py", line 6, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s677309252 | p04001 | u114099505 | 1592676798 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9032 | 157 | def a(s,i):
if i == l-1:
return sum(map(int,s.split("+")))
return a(s+s[i+1],i+1)+a(s+"+"+s[i+1],i+1)
s = input()
l = len(s)
print(a(s[0],0)) | Traceback (most recent call last):
File "/tmp/tmpm76avmw0/tmp80qoampz.py", line 5, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s460663719 | p04001 | u730769327 | 1592353473 | Python | PyPy3 (2.4.0) | py | Runtime Error | 179 | 38256 | 388 | s=input()
m=len(s)
sm=0
for i in range(2**(m-1)):
a=list(str(bin(i)))[::-1]
b=list(s)
for j in range(len(a)):
if a[j]==1:
b.insert(-j-1,'+')
sm+=eval(''.join(b))
print(sm)s=input()
m=len(s)
sm=0
for i in range(2**(m-1)):
a=list(str(bin(i)))[::-1]
b=list(s)
for j in range(len(a)-1,-1,-1):
if ... | File "/tmp/tmpr4nlhg00/tmp97gc03fi.py", line 11
print(sm)s=input()
^
SyntaxError: invalid syntax
| |
s108343773 | p04001 | u996996256 | 1592059021 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 261 | s = input()
total = 0
for i in product('01', repeat=len(s)-1):
buf = s[0]
for j in range(len(s)-1):
if i[j] == '1':
total += int(buf)
buf = s[j+1]
else:
buf += s[j+1]
total += int(buf)
print(total) | Traceback (most recent call last):
File "/tmp/tmpcqzmp4lp/tmpn7nd8uej.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s948450759 | p04001 | u996996256 | 1592058967 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 261 | s = input()
total = 0
for i in product('01', repeat=len(s)-1):
buf = s[0]
for j in range(len(s)-1):
if i[j] == '1':
total += int(buf)
buf = s[j+1]
else:
buf += s[j+1]
total += int(buf)
print(total) | Traceback (most recent call last):
File "/tmp/tmpgjfrspu1/tmp567bmyc3.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s988022229 | p04001 | u169678167 | 1591927356 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 739 | s = input()
k = len(s)
# def dfs(i, f) :
# """
# argument i : どこから始めるか
# f : 最初の数
# returen : falese or ture(作れるならtrue)
# """
# if i == k-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, ... | Traceback (most recent call last):
File "/tmp/tmpobi10wkn/tmpdune8561.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s793285241 | p04001 | u169678167 | 1591927238 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 737 | s = input()
k = len(s)
# def dfs(i, f) :
# """
# argument i : どこから始めるか
# f : 最初の数
# returen : falese or ture(作れるならtrue)
# """
# if i == k-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, ... | Traceback (most recent call last):
File "/tmp/tmp3lw9xosw/tmp_jc_5xqu.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s429378011 | p04001 | u169678167 | 1591927187 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 364 | s = input()
k = len(s)
ans = 0
for bit in range(1 << k-1):
f = s[0]
for i in range(k-1):
# if bit & (1 << i)で、bitにiが含まれているか(フラグが立っているか)を判定してくれるらしい
if bit & (1 << i):
f += '+'
f += f[i + 1]
ans += sum(list(map(int, f.split('+'))))
print(ans) | Traceback (most recent call last):
File "/tmp/tmps_e5ov1x/tmpx7y8w2mf.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s653720314 | p04001 | u101350975 | 1591896518 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 228 | from sys import stdin
S = stdin.readline().rstrip()
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/tmpcqcu3rai/tmp712d3r4k.py", line 5
if i = n-1:
^^^^^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s681538750 | p04001 | u101350975 | 1591896459 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 226 | from sys import stdin
S = stdin.readline().rstrip()
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/tmp1wuszxb_/tmp9h3lg4bn.py", line 5
if i = n-1:
^^^^^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s030320851 | p04001 | u101350975 | 1591896437 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 264 | from sys import stdin
S = stdin.readline().rstrip()
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/tmprvpx82a5/tmpknwger71.py", line 5
if i = n-1:
^^^^^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s476094493 | p04001 | u101350975 | 1591896361 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 264 | from sys import stdin
S = stdin.readline().rstrip()
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(def(0, S[0]))
| File "/tmp/tmpufmts4ul/tmpnhe15sf6.py", line 5
if i = n-1:
^^^^^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s671611464 | p04001 | u101350975 | 1591896333 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 264 | from sys import stdin
S = stdin.readline().rstrip()
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(def(0, s[0]))
| File "/tmp/tmpo_2ap7_m/tmpvp2q01cp.py", line 5
if i = n-1:
^^^^^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s333317695 | p04001 | u582614471 | 1591712282 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 275 | aqqn = list(input())
ans = 0
for i in range(2**(len(n)-1)):
plus = [""]*(len(n))
fomula = ""
for j in range(len(n)-1):
if(i>>j & 1):
plus[j] = "+"
for i in range(len(n)):
fomula += n[i] + plus[i]
ans += eval(fomula)
print(ans)
| Traceback (most recent call last):
File "/tmp/tmpx_zcdc1y/tmpxx0h16r2.py", line 1, in <module>
aqqn = list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s044792795 | p04001 | u041351774 | 1591557530 | Python | PyPy3 (2.4.0) | py | Runtime Error | 169 | 38256 | 266 | s=input()
ans=0
for i in range(1 << len(s)-1):
l=[]
for j in range(len(s)-1):
if (i>>j)&1==1:
l.append(s[j])
l.append("+")
else:
l.append(s[j])
l.append(s[len(s)-1])
sum+=eval(''.join(l))
print(sum) | Traceback (most recent call last):
File "/tmp/tmp9im001_w/tmpdmmc1xul.py", line 1, in <module>
s=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s607311448 | p04001 | u041351774 | 1591557481 | Python | PyPy3 (2.4.0) | py | Runtime Error | 179 | 38256 | 266 | s=input()
ans=0
for i in range(1 << len(s)-1):
l=[]
for j in range(len(s)-1):
if (i>>j)&1==1:
l.append(s[j])
l.append("+")
else:
l.append(S[j])
l.append(s[len(s)-1])
sum+=eval(''.join(l))
print(sum) | Traceback (most recent call last):
File "/tmp/tmprnbujg3c/tmpq4we7d44.py", line 1, in <module>
s=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s053714000 | p04001 | u541017633 | 1591337527 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 490 | // https://atcoder.jp/contests/arc061/tasks/arc061_a
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
string S;
cin >> S;
ll ans = 0;
int m = S.size() - 1;
rep(bit, 1 << m) {
ll cur = S[0] - '0';
rep(i, m) {
... | File "/tmp/tmpf3c24z1l/tmpo1vriijp.py", line 1
// https://atcoder.jp/contests/arc061/tasks/arc061_a
^^
SyntaxError: invalid syntax
| |
s167356373 | p04001 | u868982936 | 1591313768 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 280 | from itertools import *
A = list(map(int, list(input()))
ans = 0
N = len(A)-1
for p in product([0,1], repeat = N):
now = A[0]
for i in range(N):
if p[i] == 0:
now = now*10 + A[i+1]
else:
ans += now
now = A[i+1]
ans += now
print(ans)
| File "/tmp/tmpy5dv65pe/tmpfvsr_ur0.py", line 2
A = list(map(int, list(input()))
^
SyntaxError: '(' was never closed
| |
s693084327 | p04001 | u868982936 | 1591313705 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 277 | from itertools import *
A = list(map(int, list(input()))
ans = 0
N = len(A)-1
for p in product([0,1], repeat = N):
now = A[0]
for i in range(N):
if p[i] == 0:
now = now*10 + A[i+1]
else:
ans += now
now = A[i+1]
ans += now
print(ans)
| File "/tmp/tmpi6y0kzfu/tmpq9az8tfy.py", line 2
A = list(map(int, list(input()))
^
SyntaxError: '(' was never closed
| |
s289765373 | p04001 | u868982936 | 1591313655 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 273 | import itertools
A = list(map(int, list(input()))
ans = 0
N = len(A)-1
for p in product([0,1], repeat = N):
now = A[0]
for i in range(N):
if p[i] == 0:
now = now*10 + A[i+1]
else:
ans += now
now = A[i+1]
ans += now
print(ans)
| File "/tmp/tmpnikq5821/tmp489qn1g8.py", line 2
A = list(map(int, list(input()))
^
SyntaxError: '(' was never closed
| |
s235664174 | p04001 | u868982936 | 1591313418 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 279 | from itertools import *
A = list(map(int, list(input()))
ans = 0
N = len(A)-1
for p in product([0,1], repeat = N):
now = A[0]
for i in range(N):
if p[i] == 0:
now = now*10 + A[i+1]
else:
ans += now
now = A[i+1]
ans += now
print(ans) | File "/tmp/tmp52cdvy4f/tmpvltluk_9.py", line 2
A = list(map(int, list(input()))
^
SyntaxError: '(' was never closed
| |
s747039565 | p04001 | u154059173 | 1591238814 | Python | Python (3.4.3) | py | Runtime Error | 28 | 3064 | 309 | import sys
S = sys.stdin.readline()
number = [i for i in S]
N = len(number)
ans = 0
for bit in range(1<<(N-1)):
f = str(number[0])
for i in range(N-1):
if (bit&(1<<i)):
f = f+'+'+str(number[i+1])
else:
f = f+str(number[i+1])
ans = ans + eval(f)
print(ans) | Traceback (most recent call last):
File "/tmp/tmp_s_f9fmv/tmpwb4euxvv.py", line 7, in <module>
for bit in range(1<<(N-1)):
~^^~~~~~
ValueError: negative shift count
| |
s290529005 | p04001 | u154059173 | 1591238686 | Python | Python (3.4.3) | py | Runtime Error | 28 | 3064 | 309 | import sys
S = sys.stdin.readline()
number = [i for i in S]
N = len(number)
ans = 0
for bit in range(1<<(N-1)):
f = str(number[0])
for i in range(N-1):
if (bit&(1<<i)):
f = f+'+'+str(number[i+1])
else:
f = f+str(number[i+1])
ans = ans + eval(f)
print(ans) | Traceback (most recent call last):
File "/tmp/tmpa31tmrhe/tmpfiq808d9.py", line 7, in <module>
for bit in range(1<<(N-1)):
~^^~~~~~
ValueError: negative shift count
| |
s470147537 | p04001 | u154059173 | 1591238393 | Python | Python (3.4.3) | py | Runtime Error | 26 | 3064 | 294 | import sys
S = sys.stdin.readline()
number = [i for i in S]
N = len(number)
ans = 0
for bit in range(1<<(N-1)):
f = number[0]
for i in range(N-1):
if (bit&(1<<i)):
f = f+'+'+number[i+1]
else:
f = f+number[i+1]
ans = ans + eval(f)
print(ans) | Traceback (most recent call last):
File "/tmp/tmpi0c707nv/tmpm76ml25p.py", line 7, in <module>
for bit in range(1<<(N-1)):
~^^~~~~~
ValueError: negative shift count
| |
s512308020 | p04001 | u154059173 | 1591238307 | Python | Python (3.4.3) | py | Runtime Error | 26 | 3064 | 292 | import sys
S = sys.stdin.readline()
number = [i for i in S]
N = len(number)
ans = 0
for bit in range(1<<(N-1)):
f = number[0]
for i in range(N-1):
if bit&(1<<i):
f = f+'+'+number[i+1]
else:
f = f+number[i+1]
ans = ans + eval(f)
print(ans) | Traceback (most recent call last):
File "/tmp/tmpc9e1k2oc/tmpfkpbtv_8.py", line 7, in <module>
for bit in range(1<<(N-1)):
~^^~~~~~
ValueError: negative shift count
| |
s405613837 | p04001 | u154059173 | 1591238184 | Python | Python (3.4.3) | py | Runtime Error | 27 | 3060 | 293 | import sys
S = sys.stdin.readline()
number = [i for i in S]
N = len(number)
ans = 0
for bit in range(1<<(N-1)):
f = number[0]
for i in range(N-1):
if bit&(1<<i):
f = f+'+'+number[i+1]
else:
f = f+number[i+1]
ans = ans + eval(f)
print(ans)
| Traceback (most recent call last):
File "/tmp/tmpvkjyp272/tmpn9hth5lz.py", line 7, in <module>
for bit in range(1<<(N-1)):
~^^~~~~~
ValueError: negative shift count
| |
s190034342 | p04001 | u154059173 | 1591238115 | Python | Python (3.4.3) | py | Runtime Error | 27 | 3064 | 292 | import sys
S = sys.stdin.readline()
number = [i for i in S]
N = len(number)
ans = 0
for bit in range(1<<(N-1)):
f = number[0]
for i in range(N-1):
if bit&(1<<i):
f = f+'+'+number[i+1]
else:
f = f+number[i+1]
ans = ans + eval(f)
print(ans) | Traceback (most recent call last):
File "/tmp/tmpm8fe3rc7/tmpuie0n2ig.py", line 7, in <module>
for bit in range(1<<(N-1)):
~^^~~~~~
ValueError: negative shift count
| |
s985660137 | p04001 | u600261652 | 1590941195 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 178 | S = int(input())
N = len(S)
for i in range(2**(N-1)):
list = []
for j in range(N):
if ((i >> j) & 1):
list.attend(S[j:])
list.attend(S[:j])
print(sum(list)) | Traceback (most recent call last):
File "/tmp/tmp_xnqe3m6/tmpakjfv4an.py", line 1, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s841401910 | p04001 | u600261652 | 1590941031 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 158 | S = int(input())
N = len(S)
for i in range(2**(N-1)):
list = []
for j in range(N):
if ((i >> j) & 1):
list.attend(item[j][0])
print(sum(list)) | Traceback (most recent call last):
File "/tmp/tmp6nb9qmg7/tmpu2wan806.py", line 1, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s718952008 | p04001 | u600261652 | 1590940923 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 156 | S = int(input())
N = len(S)
for i in range(2**(N-1)):
list = []
for j in range(N):
if ((i >> j) & 1):
list.attend(item[j][0])
print(sum(list)) | Traceback (most recent call last):
File "/tmp/tmpuopslpsx/tmpbcaj74y2.py", line 1, in <module>
S = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s943145950 | p04001 | u696444274 | 1589938263 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3064 | 523 | s = input()
n = len(s)-1
ans = 0
for i in range(2**n):
data = []
for j in range(n):
if((i >> j) & 1):
data.append(1)
else:
data.append(0)
num = s[0]
x = []
for i in range(n-1):
if data[i] == 1:
x.append(int(num))
num = s[i+1]
... | Traceback (most recent call last):
File "/tmp/tmpahrcgr_q/tmp8npd6pd9.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s890846939 | p04001 | u780475861 | 1589832136 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 520 | def powerset(iterable):
s = list(iterable)
return chain.from_iterable(combinations(s, r) for r in range(len(s) + 1))
def s_to_num(s):
numlst = list(map(int, s))
res = 0
for i in numlst:
res *= 10
res += i
return res
s = input()
length = len(s)
res = 0
for i in powerset(range(... | Traceback (most recent call last):
File "/tmp/tmpwmaxmp89/tmp4f9c30xx.py", line 15, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s653716487 | p04001 | u257265865 | 1589329457 | Python | PyPy3 (2.4.0) | py | Runtime Error | 170 | 38384 | 157 | S=input()
n=len(S)-1
ans=0
def dfs(i,f):
if i==n:
return sum(map(int,f.split("+")))
return dfs(i+1,f)+dfs(i+1,f+"+"+S[i+1])
print(dfs(0,S[0])
| File "/tmp/tmpjgx1xwqh/tmp47gjslww.py", line 8
print(dfs(0,S[0])
^
SyntaxError: '(' was never closed
| |
s347877556 | p04001 | u257265865 | 1589329439 | Python | PyPy3 (2.4.0) | py | Runtime Error | 168 | 38256 | 157 | S=input()
n=len(S)-1
ans=0
dfs dfs(i,f):
if i==n:
return sum(map(int,f.split("+")))
return dfs(i+1,f)+dfs(i+1,f+"+"+S[i+1])
print(def(0,S[0])
| File "/tmp/tmpopg6bwla/tmpyijm77en.py", line 4
dfs dfs(i,f):
^^^
SyntaxError: invalid syntax
| |
s733009195 | p04001 | u257265865 | 1589329382 | Python | PyPy3 (2.4.0) | py | Runtime Error | 166 | 38256 | 157 | S=input()
n=len(S)-1
ans=0
def dfs(i,f):
if i==n:
return sum(map(int,f.split("+")))
return dfs(i+1,f)+dfs(i+1,f+"+"+S[i+1])
print(def(0,S[0])
| File "/tmp/tmpjwq56mzm/tmpp184qeav.py", line 8
print(def(0,S[0])
^^^
SyntaxError: invalid syntax
| |
s643490861 | p04001 | u257265865 | 1589260160 | Python | PyPy3 (2.4.0) | py | Runtime Error | 178 | 38256 | 188 | S=input()
n=len(S)
ans=0
f=S[0]
for bit in range(1<<(n-1)):
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/tmpt8ypu6h9/tmpdsvhkpb2.py", line 1, in <module>
S=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s679330107 | p04001 | u257265865 | 1589260105 | Python | PyPy3 (2.4.0) | py | Runtime Error | 172 | 38256 | 189 | S=input()
n=len(S)-1
ans=0
f=S[0]
for bit in range(1<<(n-1)):
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/tmpo7x9avei/tmpoka_jx_q.py", line 1, in <module>
S=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s261051712 | p04001 | u453623947 | 1589256701 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3064 | 345 | s = list(input())
n = len(s)
ans = 0
for i in range(2**(n-1)) :
wa = 0
kou = s[0]
for j in range(n-1):
if i>>j & 1 :
wa += int(kou)
kou = s[j+1]
else :
kou += s[j+1]
if j == n-2 :
wa += int(kou)
ans += wa
if n == 1 :
print(int(... | Traceback (most recent call last):
File "/tmp/tmpeeaqux_8/tmpsxyi1_kq.py", line 1, in <module>
s = list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s013963656 | p04001 | u057993957 | 1589211046 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 203 | s = list(input())
n = len(s)-1
ans = 0
for x in list(product(["", "+"], repeat=n)):
x = list(x)
x.append("")
strs = [i+j for i, j in zip(s, x)]
ans += eval("".join(strs))
print(ans) | Traceback (most recent call last):
File "/tmp/tmptd3t_vt4/tmpyu8xiwzr.py", line 1, in <module>
s = list(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s348896935 | p04001 | u916662650 | 1589128855 | Python | Python (3.4.3) | py | Runtime Error | 45 | 3064 | 439 | s = input()
sum = 0
l = ["+"] * (len(s) - 1)
n = 2 ** (len(s) - 1)
for i in range(n):
l = ["+"] * (len(s) - 1)
for j in range(len(l)):
ls = list(s)
if (i >> j) & 1:
l[j] = ""
for x in range(len(l)):
ls.insert(2*x+1,l[x])
maped_list =... | Traceback (most recent call last):
File "/tmp/tmpjmruqfff/tmpnlv9ppat.py", line 1, in <module>
s = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s803241875 | p04001 | u034418163 | 1588833269 | Python | Python (3.4.3) | py | Runtime Error | 77 | 3936 | 316 | S = input()
def dfs(a,s,n): #a:今まで計算した分、s:数字(文字)、n:左から何番目の位置に+を入れるか入れないか
if(len(s) == n+1):
return int(s[len(s)-1]) + int(s[:len(s)-1]) + int(s) + 2*a
else:
return dfs(a,s,n+1) + dfs(a+int(s[:n]),s[n:],1)
print(dfs(0,S,1)) | Traceback (most recent call last):
File "/tmp/tmp3d34x3yu/tmph6inwrcx.py", line 1, in <module>
S = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s489860525 | p04001 | u114099505 | 1588641496 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 155 | def a(t,i):
if i==l-1:
return sum(map(int,t.split('+'))))
return a(t+s[i+1],i+1)+a(t+'+'+s(i+1),i+1)
s=input()
l = len(s)
print(a(s[0],0))
| File "/tmp/tmphvzc3ur_/tmpsmefws9n.py", line 3
return sum(map(int,t.split('+'))))
^
SyntaxError: unmatched ')'
| |
s706451344 | p04001 | u114099505 | 1588640272 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 163 |
def a(t,i):
if i==l-1:
print(sum(map(int,t.split('+'))))
exit()
return a(t+s[i+1],i+1)+a(t+'+'+s(i+1),i+1)
s=input()
a(s[0],0)
l = len(s) | Traceback (most recent call last):
File "/tmp/tmp4dbta51i/tmpzzmb76u0.py", line 8, in <module>
s=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s485772715 | p04001 | u114099505 | 1588640199 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 164 |
def a(t,i):
if i==l-1:
print(sum(map(int,t.split('+'))))
exit()
return a(t+s[i+1],i+1)+a(t+'+'+s(i+1),i+1)
s=input()
a(s[0],0)
l = s.len() | Traceback (most recent call last):
File "/tmp/tmpx3x0msaz/tmpn4x9cc_t.py", line 8, in <module>
s=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s105866767 | p04001 | u114099505 | 1588640072 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 149 |
def a(t,i):
if i==l-1:
print(sum(map(int,t.split('+'))))
exit()
a(t+s[i+1])+a(t+'+'+s(i+1))
s=input()
a(s[0],0)
l = s.len() | Traceback (most recent call last):
File "/tmp/tmp7ybt5bis/tmp0c66op1s.py", line 8, in <module>
s=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s991380522 | p04001 | u114099505 | 1588640021 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 146 |
def a(t,i):
if i==l-1:
print(sum(int(t.split('+'))))
exit()
a(t+s[i+1])+a(t+'+'+s(i+1))
s=input()
a(s[0],0)
l = s.len() | Traceback (most recent call last):
File "/tmp/tmp80nagq9n/tmphpiigjy6.py", line 9, in <module>
s=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s632422318 | p04001 | u114099505 | 1588639899 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 143 | def a(t,i):
if i=l-1:
print(sum(int(t.split('+'))))
exit()
a(t+s[i+1])+a(t+'+'+s(i+1))
s=input()
a(s[0],0)
l = s.len() | File "/tmp/tmponu7tz4b/tmpdfs4kfgz.py", line 2
if i=l-1:
^^^^^
SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='?
| |
s243117841 | p04001 | u209426189 | 1588456588 | Python | PyPy3 (2.4.0) | py | Runtime Error | 173 | 38256 | 368 | from collection import deque
import copy
def main():
s = deque(list(input()))
s2 = copy.deepcopy(s)
n = len(s)
ans = 0
for i in range(2**n):
op = [None]*n-1
for j in range(n):
tmp_str = ''
if ((i<<j)&0):
tmp_str += s.popleft
else:
ans += int(tmp_str)
tmp_st... | Traceback (most recent call last):
File "/tmp/tmplaj7mnyv/tmpbrzbd2g3.py", line 1, in <module>
from collection import deque
ModuleNotFoundError: No module named 'collection'
| |
s441520648 | p04001 | u112315075 | 1588215113 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 374 | import sys
S = list(map(int, sys.stdin.readline()))
len_S = len(S)
ans = 0
for i in range(2 ** (len_S - 1)):
sum_ = S[len_S - 1]
cursor = len_S - 1
power = 0
pattern = i
while cursor > 0:
cursor -= 1
if pattern % 2 == 1:
power += 1
else:
power = 0
sum_ += S[cursor] * (10 ** power... | Traceback (most recent call last):
File "/tmp/tmpgrio1hyd/tmpmtocu0ex.py", line 6, in <module>
for i in range(2 ** (len_S - 1)):
^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'float' object cannot be interpreted as an integer
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.