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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s008310611 | p02540 | u274811210 | 1600634727 | Python | PyPy3 (7.3.0) | py | Runtime Error | 1521 | 159508 | 3166 |
class SegTree: # モノイドに対して適用可能、Nが2冪でなくても良い
def __init__(self ,N ,seg_func ,unit):
self.N = 1 << ( N -1).bit_length()
self.func = seg_func
self.unit = unit
self.tree = [self.unit ] *( 2 *self.N)
def build(self ,init_value): # 初期値を[N,2N)に格納
for i in range(len(init_value)... | Traceback (most recent call last):
File "/tmp/tmpv526jqr1/tmpsi5f7prk.py", line 87, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s831289559 | p02540 | u137226361 | 1600634561 | Python | Python (3.8.2) | py | Runtime Error | 2207 | 49476 | 862 | import sys
input = sys.stdin.readline
n = int(input())
par = [i for i in range(n)]
size = [1] * n
def find(x):
if par[x] == x:
return x
else:
a = find(par[x])
par[x] = a
return a
def unite(x, y):
x = find(x)
y = find(y)
a= size[x]
b= size[y]
if a >= b:
... | Traceback (most recent call last):
File "/tmp/tmp3y06swf9/tmp27cua5fs.py", line 4, in <module>
n = int(input())
^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s478596638 | p02540 | u486467381 | 1600634515 | Python | Python (3.8.2) | py | Runtime Error | 2207 | 40052 | 588 | str = input()
N = int(str)
A = [[0] * 2 for i in range(N)]
count = 1
def hoge(K, count):
countX = count
k = K[-1]
AA1 = A[k]
for i in range(N):
AA2 = A[i]
if (AA2[0] > AA1[0] and AA2[1] > AA1[1] or AA2[0] < AA1[0] and AA2[1] < AA1[1]) and not(i in K):
countX += 1
... | Traceback (most recent call last):
File "/tmp/tmpfts837hi/tmpeqmf0llf.py", line 1, in <module>
str = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s054624342 | p02540 | u966648240 | 1600634490 | Python | Python (3.8.2) | py | Runtime Error | 2207 | 47688 | 533 | N=int(input())
X=[]
par=[0]*(N)
for i in range(N):
a,b=map(int, input().split())
X.append([a,b])
par[i]=i
def find(x):
if par[x] == x:
return x
else:
par[x] = find(par[x])
return par[x]
def unite(x,y):
x = find(x)
y = find(y)
if x == y:
return 0
par[x] = ... | Traceback (most recent call last):
File "/tmp/tmp2tx0740a/tmpyunnp5h6.py", line 1, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s295072697 | p02540 | u966648240 | 1600634294 | Python | Python (3.8.2) | py | Runtime Error | 2207 | 47688 | 602 | N=int(input())
X=[]
par=[0]*(N)
for i in range(N):
a,b=map(int, input().split())
X.append([a,b])
par[i]=i
def find(x):
if par[x] == x:
return x
else:
par[x] = find(par[x])
return par[x]
def same(x,y):
return find(x) == find(y)
def unite(x,y):
x = find(x)
y = find(y)... | Traceback (most recent call last):
File "/tmp/tmpoosh6j1n/tmpg_ku35l1.py", line 1, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s317788273 | p02540 | u844789719 | 1600633346 | Python | PyPy3 (7.3.0) | py | Runtime Error | 1184 | 183236 | 6290 | import heapq
N, *XY = [int(_) for _ in open(0).read().split()]
X = XY[::2]
Y = XY[1::2]
y_k = {}
k_y = {}
for y, k in zip(Y, range(N)):
y_k[y] = k
k_y[k] = y
class UnionFind():
def __init__(self, n):
self.n = n
self.root = [-1] * (n + 1)
self.rank = [0] * (n + 1)
def find(self... | Traceback (most recent call last):
File "/tmp/tmp2humxyxw/tmpkipkb95z.py", line 2, in <module>
N, *XY = [int(_) for _ in open(0).read().split()]
^^^^^^
ValueError: not enough values to unpack (expected at least 1, got 0)
| |
s705648136 | p02540 | u678167152 | 1600633234 | Python | PyPy3 (7.3.0) | py | Runtime Error | 770 | 109580 | 2309 | # Binary Indexed Tree (Fenwick Tree)
class BIT:
def __init__(self, n):
self.n = n
self.bit = [0]*(n+1)
self.el = [0]*(n+1)
def sum(self, i):
s = 0
while i > 0:
s += self.bit[i]
i -= i & -i
return s
def add(self, i, x):
# assert i > 0
self.el[i] += x
while i <= self.... | Traceback (most recent call last):
File "/tmp/tmph7jjn0su/tmpk7lwlwju.py", line 81, in <module>
N = int(input())
^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s724397593 | p02540 | u678167152 | 1600633179 | Python | PyPy3 (7.3.0) | py | Runtime Error | 695 | 109368 | 2311 | # Binary Indexed Tree (Fenwick Tree)
class BIT:
def __init__(self, n):
self.n = n
self.bit = [0]*(n+1)
self.el = [0]*(n+1)
def sum(self, i):
s = 0
while i > 0:
s += self.bit[i]
i -= i & -i
return s
def add(self, i, x):
# assert i > 0
self.el[i] += x
while i <= self.... | Traceback (most recent call last):
File "/tmp/tmpacvtmkbh/tmpie6rfawo.py", line 81, in <module>
N = int(input())
^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s169256999 | p02540 | u015019251 | 1600632434 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 38028 | 910 | # -*- coding: utf-8 -*-
"""
Created on Sat Aug 15 17:00:46 2020
@author: saito
"""
# %% import phase
# %% define phase
def root(x):
if par[x] == x:
return x
else:
par[x] = root(par[x])
return par[x]
def same(x, y):
return root(x) == root(y)
def unite(x, y):
x = root(x)
y... | Traceback (most recent call last):
File "/tmp/tmppcst9tp7/tmpb48pyj0b.py", line 31, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s552664111 | p02540 | u678167152 | 1600632250 | Python | PyPy3 (7.3.0) | py | Runtime Error | 1474 | 119496 | 2230 | # Binary Indexed Tree (Fenwick Tree)
class BIT:
def __init__(self, n):
self.n = n
self.bit = [0]*(n+1)
self.el = [0]*(n+1)
def sum(self, i):
s = 0
while i > 0:
s += self.bit[i]
i -= i & -i
return s
def add(self, i, x):
# assert i > 0
self.el[i] += x
while i <= self.... | Traceback (most recent call last):
File "/tmp/tmpvmzylxne/tmphepc4_88.py", line 80, in <module>
N = int(input())
^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s832430912 | p02540 | u415718506 | 1600632104 | Python | Python (3.8.2) | py | Runtime Error | 34 | 9916 | 2884 | import sys
import heapq, functools, collections
import math, random
from collections import Counter, defaultdict
from atcoder.fenwicktree import FenwickTree
# available on Google, not available on Codeforces
# import numpy as np
# import scipy
def solve(grid, n): # fix inputs here
console("----- solving ------... | Traceback (most recent call last):
File "/tmp/tmp_nus8k6x/tmpx6hyuw71.py", line 6, in <module>
from atcoder.fenwicktree import FenwickTree
ModuleNotFoundError: No module named 'atcoder'
| |
s691734051 | p02540 | u015019251 | 1600632001 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 38268 | 882 | # -*- coding: utf-8 -*-
"""
Created on Sat Aug 15 17:00:46 2020
@author: saito
"""
# %% import phase
# %% define phase
def root(x):
if par[x] == x:
return x
else:
par[x] = root(par[x])
return par[x]
def same(x, y):
return root(x) == root(y)
def unite(x, y):
x = root(x)
y... | Traceback (most recent call last):
File "/tmp/tmpuy16jv1g/tmpzxfde9f7.py", line 31, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s212726066 | p02540 | u015019251 | 1600631561 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 38140 | 852 | # -*- coding: utf-8 -*-
"""
Created on Sat Aug 15 17:00:46 2020
@author: saito
"""
# %% import phase
# %% define phase
def root(x):
if par[x] == x:
return x
else:
par[x] = root(par[x])
return par[x]
def same(x, y):
return root(x) == root(y)
def unite(x, y):
x = root(x)
y... | Traceback (most recent call last):
File "/tmp/tmp8plgsrlp/tmprd1pauo6.py", line 32, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s286717298 | p02540 | u023229441 | 1600630963 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2208 | 105204 | 2949 | n=int(input())
class UnionFind():
def __init__(self,num):
self.n = num #class内変数nに、外部から入力した値numを代入
self.parents = [-1 for i in range(self.n)]
#parentsは要素の親(1こ上のやつ)番号0~n-1を格納、自分が最親なら-(要素数)を格納(初期値は-1)
#xの最親は誰?
def find(self,x):
if self.parents[x]<0:
retu... | Traceback (most recent call last):
File "/tmp/tmps7cc633f/tmpq07mctq3.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s159106478 | p02540 | u773081031 | 1600630903 | Python | Python (3.8.2) | py | Runtime Error | 931 | 112088 | 394 | n = int(input())
z = [[map(int, input().split())] for i in range(n)]
a = []
for i in range(n):
z_ = z
f = z_.pop(i)
x = [f]
for j in z_:
if f[0]>j[0] and f[1]>j[1]:
x.append(j)
elif f[0]<j[0] and f[1]<j[1]:
x.append(j)
a.append(x)
for i in range(n):
ans = a[i]
for j in range(n):
... | Traceback (most recent call last):
File "/tmp/tmpj4lrojb4/tmpihybj54h.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s904166734 | p02540 | u773081031 | 1600630861 | Python | Python (3.8.2) | py | Runtime Error | 30 | 8944 | 405 | n = int(input())
z = [[x, y] for i in range(n) x, y = map(int, input().split())]
a = []
for i in range(n):
z_ = z
f = z_.pop(i)
x = [f]
for j in z_:
if f[0]>j[0] and f[1]>j[1]:
x.append(j)
elif f[0]<j[0] and f[1]<j[1]:
x.append(j)
a.append(x)
for i in range(n):
ans = a[i]
for j in ... | File "/tmp/tmp7ul7u_1f/tmp6b4h9gjo.py", line 2
z = [[x, y] for i in range(n) x, y = map(int, input().split())]
^
SyntaxError: invalid syntax
| |
s921197543 | p02540 | u370721525 | 1600630337 | Python | Python (3.8.2) | py | Runtime Error | 2207 | 47832 | 426 | N = int(input())
l = []
for i in range(N):
l.append(list(map(int, input().split())))
def main(n, tmp):
global l
for i in range(n+1, N):
if (l[n][0]-l[i][0]) * (l[n][1]-l[i][1]) > 0:
tmp.append(i)
tmp = main(i, tmp)
return list(set(tmp))
ans = [True] * N
for i in range(N):
if ans[i] == True:
... | Traceback (most recent call last):
File "/tmp/tmp7e1dlsga/tmpvv8ubgbm.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s433226463 | p02540 | u171731224 | 1600630309 | Python | Python (3.8.2) | py | Runtime Error | 2274 | 2688080 | 335 | n=int(input())
l=[]
grid=[[0]*n for i in range(n)]
for i in range(n):
x=list(map(int,input().split()))
grid[x[0]-1][x[1]-1]=1
l.append(x)
def dfs(i,j):
if(i<0 or j<0 or i>n or j>n):
return 0
if(grid[i][j]==1):
return 1
c=dfs(i+1,j+1)+dfs(i-1,j-1)+1
return c
for i in range(n):
print(dfs(l[i][0],l... | Traceback (most recent call last):
File "/tmp/tmpnvrz1jv1/tmpc26vxr22.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s660409731 | p02540 | u366886346 | 1600630103 | Python | Python (3.8.2) | py | Runtime Error | 36 | 9168 | 3 | あ | Traceback (most recent call last):
File "/tmp/tmpfv1nijzs/tmpzjqukxoy.py", line 1, in <module>
あ
NameError: name 'あ' is not defined
| |
s666409859 | p02540 | u569511944 | 1600629812 | Python | PyPy2 (7.3.0) | py | Runtime Error | 2464 | 329000 | 1116 | n=input()
a=[[int(i) for i in raw_input().split()]for j in range(n)]
c={}
for i in range(n):
c[i]=a[i][0]-1
a.sort()
miny=a[0][1]
pos=0
l=[i for i in range(n)]
r=[0 for i in range(n)]
dx={}
dy={}
def find(x):
if l[x]==x:
return l[x]
return find(l[x])
for i in range(1,n):
if a[i][1]>miny:
... | File "/tmp/tmpm0dqpf03/tmpe1d9csfb.py", line 52
print l
^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
| |
s819021227 | p02540 | u061835391 | 1600628910 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9244 | 291 | n=int(input())
l=[]
m=[]
for i in range(0,n):
p,q=map(int,input().split())
w.append((p,q))
h=[]
for i in range(0,len(w)):
c=1
for j in range(0,len(w)):
s,t=w[i]
f,g=w[j]
if (s,t)<(f,g):
c=c+1
elif (s,t)>(f,g):
c=c+1
h.append(c)
for i in h:
print(i)
| Traceback (most recent call last):
File "/tmp/tmpiaj4yg0d/tmp5hldno_3.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s582655063 | p02541 | u785989355 | 1600702400 | Python | PyPy3 (7.3.0) | py | Runtime Error | 86 | 68828 | 4043 | from collections import defaultdict
def _is_prime(n):
'''
Reference:
M. Forisek and J. Jancina,
Fast Primality Testing for Integers That Fit into a Machine Word
'''
if n <= 1:
return False
if n == 2 or n == 7 or n == 61:
return True
if n % 2 == 0:
return False
... | Traceback (most recent call last):
File "/tmp/tmpavie94ui/tmpwmug1io7.py", line 32, in <module>
def _inv_gcd(a: int, b: int) -> typing.Tuple[int, int]:
^^^^^^
NameError: name 'typing' is not defined
| |
s983190171 | p02541 | u923270446 | 1600693674 | Python | PyPy3 (7.3.0) | py | Runtime Error | 95 | 68732 | 6093 | from math import ceil
n = int(input())
import math
import numpy as np
import decimal
import collections
import itertools
import sys
import random
#Union-Find
class UnionFind():
def __init__(self, n):
self.n = n
self.par = [-1 for i in range(self.n)]
def find(self, x):
if self.par[x] < 0... | Traceback (most recent call last):
File "/tmp/tmp68duhzfb/tmps3kez8b4.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s793389684 | p02541 | u454093752 | 1600689141 | Python | PyPy3 (7.3.0) | py | Runtime Error | 84 | 68716 | 348 | import sympy.ntheory.modular
N = int(input())
N *= 2
K = [[1, N]]
for i in range(2, max(int(N**0.5)+2, 2)):
if N % i == 0:
K.append([i, N//i])
ans = float("inf")
for i in range(len(K)):
a, b = K[i]
x = sympy.ntheory.modular.crt([a, b], [0, -1])
if x is None:
pass
else:
ans ... | Traceback (most recent call last):
File "/tmp/tmpop3aq1l_/tmpnu7zs52y.py", line 3, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s737336763 | p02541 | u829416877 | 1600664952 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 9232 | 121 | N = int(input())
for i in range(1,N):
X = i*(i+1)/2/N
Y = i*(i+1)/2//N
if X == Y:
ans = i
break
print(ans) | Traceback (most recent call last):
File "/tmp/tmpr_tnh88p/tmpu7va3h6r.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s148265871 | p02541 | u516018862 | 1600646439 | Python | PyPy3 (7.3.0) | py | Runtime Error | 106 | 68812 | 112 | n, i, sum_ = int(input()), 1, 1
while True:
if sum_ % n == 0:
print(i)
break
i += 1
sum += i
| Traceback (most recent call last):
File "/tmp/tmpv_ogb5jj/tmp42a4yzzs.py", line 1, in <module>
n, i, sum_ = int(input()), 1, 1
^^^^^^^
EOFError: EOF when reading a line
| |
s695707408 | p02541 | u645855527 | 1600637399 | Python | PyPy3 (7.3.0) | py | Runtime Error | 137 | 74608 | 1423 | from collections import Counter
# 拡張ユークリッド互除法
# gcd(a,b) と ax + by = gcd(a,b) の最小整数解を返す
def egcd(a, b):
if a == 0:
return b, 0, 1
else:
g, y, x = egcd(b % a, a)
return g, x - (b // a) * y, y
def chineseRem(b1, m1, b2, m2):
# 中国剰余定理
# x ≡ b1 (mod m1) ∧ x ≡ b2 (mod m2) <=> x ≡ ... | File "/tmp/tmp3ocnntbp/tmp_t38gtp5.py", line 50
print(2)
^
SyntaxError: invalid character '2' (U+FF12)
| |
s934714736 | p02541 | u879921371 | 1600637373 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9116 | 1227 | import numpy as np
import itertools
def factorization(num):
return factor
def main():
n2=int(input())
n=n2
if n==1:
print(1)
exit()
num=n
factor = []
while num > 1:
for i in range(num - 1):
k = i + 2
if num % k == 0:
factor.append(k)
num = int(num / k)
br... | File "/tmp/tmp_wf8pthm/tmpm0uxy0lj.py", line 53
exit()
TabError: inconsistent use of tabs and spaces in indentation
| |
s233869141 | p02541 | u588341295 | 1600636953 | Python | PyPy3 (7.3.0) | py | Runtime Error | 243 | 382404 | 4791 | import sys
def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c for j in range(b)] for i in range(a)]
def list3d(a, b, c, d): return [[[d for k in range(c)] for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e for l in range(d)] for k in range(c)] for j in range(b)]... | Traceback (most recent call last):
File "/tmp/tmp1uawztzn/tmpu_s1jk8b.py", line 156, in <module>
N = INT()
^^^^^
File "/tmp/tmp1uawztzn/tmpu_s1jk8b.py", line 8, in INT
def INT(): return int(input())
^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s113218681 | p02541 | u015019251 | 1600636363 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 9092 | 372 | # -*- coding: utf-8 -*-
"""
Created on Sat Aug 15 17:00:46 2020
@author: saito
"""
# %% import phase
import math
# %% define phase
# %% input phase
N = int(input())
# %% process phase
s = int(math.sqrt(2*N))
t = s-1
old = (t*t + t)/2
for i in range(N-s):
j = i+s;
new = old + j
if new % N == 0:
... | Traceback (most recent call last):
File "/tmp/tmphimjp0iv/tmplh4w8qmf.py", line 14, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s895343275 | p02541 | u474212171 | 1600635942 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8916 | 554 | z=int(input())
def solv_quadratic_equation(a, b, c):
""" 2次方程式を解く """
D = (b**2 - 4*a*c) ** (1/2)
x_1 = (-b + D) / (2 * a)
x_2 = (-b - D) / (2 * a)
return x_1,x_2
ans=0
i=1
# print(10**15)
# a,b=solv_quadratic_equation(1,1,1000000000000000)
# print(a,b)
while True:
a,b=solv_quadratic_equation(1,1,... | File "/tmp/tmp0ddnp1va/tmpvkpropvw.py", line 31
elif a=<b:
^
SyntaxError: invalid syntax
| |
s277684726 | p02541 | u476674874 | 1600635265 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9000 | 97 | N = int(input())
ans = resolve(N)
print(ans)
if __name__ == '__main__':
main()
| File "/tmp/tmpzrikivvm/tmpvacn3eu9.py", line 1
N = int(input())
IndentationError: unexpected indent
| |
s286343027 | p02541 | u104282757 | 1600634870 | Python | Python (3.8.2) | py | Runtime Error | 123 | 27164 | 1140 | from itertools import chain, combinations
import numpy as np
import sympy
def ext_gcd(a, b):
x0, y0, x1, y1 = 1, 0, 0, 1
while b != 0:
q, a, b = a // b, b, a % b
x0, x1 = x1, x0 - q * x1
y0, y1 = y1, y0 - q * y1
return a, x0, y0
def solve(n):
# prime factorization
factori... | Traceback (most recent call last):
File "/tmp/tmp2_cffqqp/tmpbj1r6_ul.py", line 54, in <module>
test()
File "/tmp/tmp2_cffqqp/tmpbj1r6_ul.py", line 49, in test
assert solve(11) == 10
^^^^^^^^^
File "/tmp/tmp2_cffqqp/tmpbj1r6_ul.py", line 30, in solve
p = np.int(np.prod(s))
^^^^^^
... | |
s452628927 | p02541 | u550289743 | 1600634716 | Python | Python (3.8.2) | py | Runtime Error | 31 | 9156 | 157 | N=int(input())
for p in range(1, 2 * N - 1):
sq = int(math.sqrt(2*N * p))
if 2*N*p % sq == 0 and 2*N*p ==sq *(sq+1):
print(sq)
break
| Traceback (most recent call last):
File "/tmp/tmp9su2edds/tmpx7hb9mki.py", line 1, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s742091211 | p02541 | u550289743 | 1600634500 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9148 | 137 | N = int(input())
for p in range(1, 2 * N - 1):
sq = int(math.sqrt(2*N * p))
if 2*N*p % sq == 0 :
print(sq)
break
| Traceback (most recent call last):
File "/tmp/tmpj0_9dt9o/tmp9ebpv_p0.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s621420527 | p02541 | u216928054 | 1600634396 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2207 | 68836 | 2583 | import sys
def debug(*x):
print(*x, file=sys.stderr)
def ex():
for i in range(2, 100):
for j in range(1, i - 1):
if (j * (j + 1) // 2) % i == 0:
# debug("i, j", i, j)
break
else:
debug("i", i)
def blute(N):
for i in range(1, N):
... | Traceback (most recent call last):
File "/tmp/tmppzbo25zr/tmpzlckdr0k.py", line 139, in <module>
main()
File "/tmp/tmppzbo25zr/tmpzlckdr0k.py", line 87, in main
N = int(input())
^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: b''
| |
s392239503 | p02541 | u789290859 | 1600634033 | Python | Python (3.8.2) | py | Runtime Error | 132 | 9656 | 500 | def solv_quadratic_equation(a, b, c):
""" 2次方程式を解く """
D = (b**2 - 4*a*c) ** (1/2)
x_1 = (-b + D) / (2 * a)
x_2 = (-b - D) / (2 * a)
return x_1, x_2
N = int(input())
a = N
i = 0
li = []
while True:
x_1,x_2 = solv_quadratic_equation(float(1),float(1),float(-2*N))
if x_1.is_integer() and x_... | Traceback (most recent call last):
File "/tmp/tmpkp6o7i6g/tmp2hnsc0ev.py", line 8, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s105078806 | p02541 | u968431218 | 1600634020 | Python | Python (3.8.2) | py | Runtime Error | 443 | 9608 | 135 | n=int(input())
for i in range(1,n):
#print(i)
if (1+8*n*i)**0.5==int((1+8*n*i)**0.5):
k=(1+8*n*i)**0.5
break
print(int((-1+k)/2)) | Traceback (most recent call last):
File "/tmp/tmpsr4kysok/tmptmnoh5ks.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s173807989 | p02541 | u773081031 | 1600634018 | Python | Python (3.8.2) | py | Runtime Error | 31 | 9012 | 141 | import math
n = int(input())
a = 0
whil True:
a += 1
sq = math.sqrt(2*a*n)
k = math.floor(sq)
if k*(k+1)==2*a*n:
break
print(k)
| File "/tmp/tmpji5iyggu/tmpxfimipq8.py", line 5
whil True:
^^^^
SyntaxError: invalid syntax
| |
s768386170 | p02541 | u401686269 | 1600634010 | Python | PyPy3 (7.3.0) | py | Runtime Error | 170 | 74760 | 585 | from math import prod
def factorize(n):
out=[]
i = 2
while 1:
if n%i==0:
out.append(i)
n //= i
else:
i += 1
if n == 1:break
if i > int(n**.5+3):
out.append(n)
break
return out
N = int(input())
if N == 1:... | Traceback (most recent call last):
File "/tmp/tmplp3qsz9h/tmpygtmrf3h.py", line 19, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s920634227 | p02541 | u968431218 | 1600633904 | Python | Python (3.8.2) | py | Runtime Error | 443 | 9620 | 144 | n=int(input())
for i in range(1,(n-1)//2+1):
#print(i)
if (1+8*n*i)**0.5==int((1+8*n*i)**0.5):
k=(1+8*n*i)**0.5
break
print(int((-1+k)/2)) | Traceback (most recent call last):
File "/tmp/tmpvjq5up4f/tmp065kmvsq.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s448679086 | p02541 | u347502437 | 1600633631 | Python | Python (3.8.2) | py | Runtime Error | 2283 | 2145688 | 975 | from math import sqrt
from math import ceil
def mpfli(N): #minimum prime factor listのこと
li = [i for i in range(N+1)]
li2 = [i for i in range(N+1)]
for i in range(2,ceil(sqrt(N+1))):
for j in range(2*i, N + 1):
if li[j]== li2[j]:
if li[j] % li[i] == 0:
... | Traceback (most recent call last):
File "/tmp/tmpg8zna5j7/tmpy5a6y2qn.py", line 42, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s013830489 | p02541 | u101017353 | 1600633546 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2207 | 69972 | 336 | import collections
def cal(c):
x=1+4*c*2
if x<=0:
return -1,-1
else:
x=x**0.5
x1=(-1+x)/2
x2=(-1-x)/2
return x1,x2
def cal2(val):
return (val**2+val)/2
n=int(input())
base=n
out=1
while out%n!=0:
x,_=cal(base)
if x!=-1:
out=cal2(int(x))
base+=... | Traceback (most recent call last):
File "/tmp/tmpn9r2owbv/tmpteroqday.py", line 13, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s057497752 | p02541 | u546157297 | 1600633520 | Python | Python (3.8.2) | py | Runtime Error | 512 | 342344 | 145 | def main2():
import numpy as np
N = int(input())
Ds = np.where((np.arange(1,N+1).cumsum()%N) == 0)
print(Ds[0][0]+1)
main2() | Traceback (most recent call last):
File "/tmp/tmpw4y_caxb/tmp3yage5l1.py", line 7, in <module>
main2()
File "/tmp/tmpw4y_caxb/tmp3yage5l1.py", line 3, in main2
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s107093143 | p02541 | u101017353 | 1600633455 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2207 | 69848 | 360 | import collections
def cal(c):
x=1+4*c*2
if x<=0:
return -1,-1
else:
x=x**0.5
x1=(-1+x)/2
x2=(-1-x)/2
return x1,x2
def cal2(val):
return (val**2+val)/2
n=int(input())
base=n
out=out2=1
while out%n!=0 and out2%n!=0:
x1,x2=cal(base)
if x1!=-1:
out=c... | Traceback (most recent call last):
File "/tmp/tmp8d96c91h/tmp_bwepf8f.py", line 13, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s531478441 | p02541 | u546157297 | 1600633368 | Python | Python (3.8.2) | py | Runtime Error | 511 | 500120 | 156 | def main2():
import numpy as np
N = int(input())
D = np.arange(1, N+1)
Ds = np.where((D.cumsum()%N) == 0)
print(Ds[0][0]+1)
main2() | Traceback (most recent call last):
File "/tmp/tmpchg6k1dd/tmp4xqufer9.py", line 8, in <module>
main2()
File "/tmp/tmpchg6k1dd/tmp4xqufer9.py", line 3, in main2
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s489258212 | p02541 | u874320250 | 1600633277 | Python | PyPy3 (7.3.0) | py | Runtime Error | 255 | 68572 | 145 | import math
N = int(input())
for a in range(1, N):
k = math.sqrt(2 * N * a + 1 / 4) - 1 / 2
if k % 1 == 0:
break
print(int(k))
| Traceback (most recent call last):
File "/tmp/tmpc06mpoyi/tmp6iuy6k68.py", line 3, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s559376183 | p02541 | u320027541 | 1600633110 | Python | Python (3.8.2) | py | Runtime Error | 251 | 27152 | 175 | import numpy
N = int(input())
i = 1
while True:
root = numpy.sqrt(8 * N * i + 1)
if root.is_integer():
print(int((root - 1) / 2))
exit()
i += 1
| Traceback (most recent call last):
File "/tmp/tmpg5d0t9vv/tmpfedmtrm2.py", line 3, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s229427234 | p02541 | u475402977 | 1600632977 | Python | Python (3.8.2) | py | Runtime Error | 2230 | 808440 | 1010 | import sys
def make_prime_table(n):#nまでの整数について,それに含まれる最大の素数
sieve = list(range(n + 1))
sieve[0] = -1
sieve[1] = -1
for i in range(4, n + 1, 2):
sieve[i] = 2
for i in range(3, int(n ** 0.5) + 1, 2):
if sieve[i] != i:
continue
for j in range(i * i, n + 1, i * 2):
... | Traceback (most recent call last):
File "/tmp/tmpj7kmpq5d/tmpr18l2pvz.py", line 27, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s268673960 | p02541 | u091051505 | 1600632894 | Python | PyPy3 (7.3.0) | py | Runtime Error | 144 | 74616 | 1062 | def prime_factorize(n):
a = []
while n % 2 == 0:
a.append(2)
n //= 2
f = 3
while f * f <= n:
if n % f == 0:
a.append(f)
n //= f
else:
f += 2
if n != 1:
a.append(n)
return a
from collections import Counter
n = int(input(... | File "/tmp/tmpwblr4br4/tmp7mrry8ev.py", line 22
break
^^^^^
SyntaxError: 'break' outside loop
| |
s900035815 | p02541 | u091051505 | 1600632839 | Python | PyPy3 (7.3.0) | py | Runtime Error | 247 | 77876 | 1028 | def prime_factorize(n):
a = []
while n % 2 == 0:
a.append(2)
n //= 2
f = 3
while f * f <= n:
if n % f == 0:
a.append(f)
n //= f
else:
f += 2
if n != 1:
a.append(n)
return a
from collections import Counter
n = int(input(... | Traceback (most recent call last):
File "/tmp/tmpsmsi9hpp/tmpklnfju20.py", line 18, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s372353445 | p02541 | u091051505 | 1600632734 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 15780 | 1028 | def prime_factorize(n):
a = []
while n % 2 == 0:
a.append(2)
n //= 2
f = 3
while f * f <= n:
if n % f == 0:
a.append(f)
n //= f
else:
f += 2
if n != 1:
a.append(n)
return a
from collections import Counter
n = int(input(... | Traceback (most recent call last):
File "/tmp/tmpg6hnf5pm/tmpipj7yzbc.py", line 18, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s444476353 | p02541 | u401686269 | 1600632493 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 9456 | 387 | def factorize(n):
out=[]
i = 2
while 1:
if n%i==0:
out.append(i)
n //= i
else:
i += 1
if n == 1:break
if i > int(n**.5+3):
out.append(n)
break
return out
N = int(input())
f = factorize(N)[-1]
for i in ran... | Traceback (most recent call last):
File "/tmp/tmpv9cdfm8z/tmpa6ewk32g.py", line 17, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s975544507 | p02541 | u914098558 | 1600631813 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9028 | 166 | try:
N=int(input())
sum=0
for i in range(1,100000)
sum=sum+i
if sum%N==0:
print(i)
break
except:
pass
| File "/tmp/tmphj2mxrdy/tmphfjg461t.py", line 5
for i in range(1,100000)
^
SyntaxError: expected ':'
| |
s053892911 | p02541 | u914098558 | 1600631740 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9004 | 170 | try:
N=int(input())
sum=0
i=1
for i in range(1,100000)
sum=sum+i
if sum%N==0:
print(i)
break
except:
pass
| File "/tmp/tmphwq1ob7p/tmphcmzc7zc.py", line 5
for i in range(1,100000)
^
SyntaxError: expected ':'
| |
s292118932 | p02541 | u504856568 | 1600631578 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9168 | 153 | N = int(input())
A = (-1 + math.sqrt(1 + 8 * N))/2
B = N
while not A.is_integer():
B = B + N
A = (-1 + math.sqrt(1 + 8 * B))/2
print(int(A)) | Traceback (most recent call last):
File "/tmp/tmpro5t3a4c/tmp52c4sb42.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s841204797 | p02541 | u566383189 | 1600631521 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9092 | 136 | n = input()
num = 1 + 8*n
root = int(math.sqrt(num))
while((root*root)!=num):
num+=8*n
root = int(math.sqrt(num))
print((root-1)/2)
| Traceback (most recent call last):
File "/tmp/tmpb1fuv7q3/tmposq19qz7.py", line 1, in <module>
n = input()
^^^^^^^
EOFError: EOF when reading a line
| |
s393154663 | p02541 | u504856568 | 1600631500 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9172 | 167 | N = int(input())
A = float((-1 + math.sqrt(1 + 8 * N))/2)
B = N
while not A.is_integer():
B = B + N
A = float((-1 + math.sqrt(1 + 8 * B))/2)
print(int(A)) | Traceback (most recent call last):
File "/tmp/tmpnvv3di8y/tmpjtw2pq3p.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s577763113 | p02541 | u504856568 | 1600631467 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9160 | 162 | N = int(input())
A = float((-1 + math.sqrt(1 + 8 * N))/2)
B = N
while not A.is_integer():
B = B + N
A = float((-1 + math.sqrt(1 + 8 * B))/2)
print(A) | Traceback (most recent call last):
File "/tmp/tmp091zm1ld/tmp8du7lh6e.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s848614192 | p02541 | u111365362 | 1600631451 | Python | PyPy3 (7.3.0) | py | Runtime Error | 716 | 82404 | 1113 | n = int(input())
n *= 2
ans = []
ans2 = []
for i in range(2,32*10**6):
if n % i == 0:
ans.append(i)
n //= i
cnt = 1
while n % i == 0:
n //= i
cnt += 1
ans2.append(cnt)
if n != 1:
ans.append(n)
ans2.append(1)
#print(ans)
#print(ans2)
l = len(ans)
for i in range(l):
ans[i] **= ans2... | Traceback (most recent call last):
File "/tmp/tmp9v_mfr1f/tmpospc9xjh.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s141097248 | p02541 | u460763828 | 1600631430 | Python | Python (3.8.2) | py | Runtime Error | 1364 | 27172 | 325 | import numpy as np
def main():
N = int(input())
a = 1
while True:
if isinstance(np.sqrt(2 * a * N), float):
k = int(np.sqrt(2 * a * N))
if k * (k + 1) / 2 == a * N:
print(k)
break
a += 1
return
if __name__ == '__main__':
ma... | Traceback (most recent call last):
File "/tmp/tmpe0wwekan/tmprs5otyco.py", line 19, in <module>
main()
File "/tmp/tmpe0wwekan/tmprs5otyco.py", line 5, in main
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s665470491 | p02541 | u460763828 | 1600631269 | Python | Python (3.8.2) | py | Runtime Error | 1366 | 27176 | 301 | import numpy as np
def main():
N = int(input())
a = 1
while True:
if isinstance(np.sqrt(2 * a * N), float):
k = int(np.sqrt(2*a*N))
if k*(k+1)/2 == a*N:
print(k)
return
a += 1
if __name__ == '__main__':
main() | Traceback (most recent call last):
File "/tmp/tmpm619rt48/tmpzez0h4gd.py", line 17, in <module>
main()
File "/tmp/tmpm619rt48/tmpzez0h4gd.py", line 4, in main
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s002291816 | p02541 | u098368455 | 1600631220 | Python | PyPy3 (7.3.0) | py | Runtime Error | 607 | 68612 | 793 | def euclid(x, y):
c0, c1 = x, y
a0, a1 = 1, 0
b0, b1 = 0, 1
while c1 != 0:
m = c0 % c1
q = c0 // c1
c0, c1 = c1, m
a0, a1 = a1, (a0 - q * a1)
b0, b1 = b1, (b0 - q * b1)
return a0, b0
n=int(input())
n*=2
soinsu=[]
num=n
for i in range(2,n):
if(i*i>n... | Traceback (most recent call last):
File "/tmp/tmpqx1q3mje/tmpnupnl9fw.py", line 16, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s414857998 | p02541 | u966648240 | 1600630773 | Python | Python (3.8.2) | py | Runtime Error | 2227 | 775372 | 174 | N=int(input())
sum=[0]*(N+1)
sum[1]=1
ans=0
for i in range(N+1):
sum[i]=i+sum[i-1]
for j in range(N+1):
if sum[j]%N==0 and j !=0 :
ans=j
break;
print(ans) | Traceback (most recent call last):
File "/tmp/tmpw_obki8b/tmp2ms1ag2y.py", line 1, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s088981188 | p02541 | u253333670 | 1600630754 | Python | Python (3.8.2) | py | Runtime Error | 29 | 8948 | 897 | from math import sqrt
def arr():
return list(map(int, input().split()))
def isPrime(n):
if (n <= 1):
return False
if (n <= 3):
return True
if (n % 2 == 0 or n % 3 == 0):
return False
i = 5
while(i * i <= n):
if (n % i == 0 or n % (i + 2) == 0):
ret... | File "/tmp/tmp6j33u6zx/tmpvazbuzkb.py", line 11
if (n <= 3):
^
IndentationError: unindent does not match any outer indentation level
| |
s695621571 | p02541 | u966648240 | 1600630685 | Python | Python (3.8.2) | py | Runtime Error | 2231 | 868260 | 174 | N=int(input())
sum=[0]*2*N
sum[1]=1
ans=0
for i in range(2*N):
sum[i]=i+sum[i-1]
for j in range(0,2*N):
if sum[j]%N==0 and j !=0 :
ans=j
break;
print(ans) | Traceback (most recent call last):
File "/tmp/tmpa27_i527/tmpcbiv3j3n.py", line 1, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s126688441 | p02541 | u966648240 | 1600630565 | Python | Python (3.8.2) | py | Runtime Error | 2231 | 878332 | 174 | N=int(input())
sum=[0]*2*N
sum[1]=1
ans=0
for i in range(2*N):
sum[i]=i+sum[i-1]
for j in range(0,2*N):
if sum[j]%N==0 and j !=0 :
ans=j
break;
print(ans) | Traceback (most recent call last):
File "/tmp/tmpqoai2i6v/tmplr47jb_o.py", line 1, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s142867805 | p02541 | u460763828 | 1600630553 | Python | Python (3.8.2) | py | Runtime Error | 753 | 27152 | 239 | import numpy as np
def main():
N = int(input())
a = 1
while True:
k = int(np.sqrt(2 * a * N))
if k*(k+1) == 2*a*N:
print(k)
return
a += 1
if __name__ == '__main__':
main() | Traceback (most recent call last):
File "/tmp/tmpeazs5gy7/tmpe7qk3d3x.py", line 16, in <module>
main()
File "/tmp/tmpeazs5gy7/tmpe7qk3d3x.py", line 4, in main
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s716375637 | p02541 | u327466606 | 1600630361 | Python | PyPy3 (7.3.0) | py | Runtime Error | 440 | 68912 | 955 | from math import gcd
from collections import Counter
from itertools import product
min2 = lambda x,y: x if x < y else y
def lcm(A):
m = 1
for a in A:
m *= a//gcd(m,a)
return m
def chinese_remainder_theorem(R, M):
"""
returns x and lcm(M) s.t.
all(x%m == r for r,m in zip(R,M))
"... | Traceback (most recent call last):
File "/tmp/tmpcp9t6p_i/tmplu3ql76f.py", line 44, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s538863521 | p02541 | u880400515 | 1600630302 | Python | PyPy3 (7.3.0) | py | Runtime Error | 181 | 69784 | 149 | import math
N = int(input())
for i in range(1, N):
if (((-1 + math.sqrt(1 + 8 * N * i)) / 2).is_integer()):
print(int(a))
break
| Traceback (most recent call last):
File "/tmp/tmpxv4x1huk/tmp7a9qk9se.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s640144226 | p02541 | u516079739 | 1600629994 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 9092 | 104 | n = int(input())
s=0
v=[]
for i in range(1,n):
s=s+i
if s%n==0:
v.append(i)
print(v[0]) | Traceback (most recent call last):
File "/tmp/tmp2f8eznqf/tmp3duv0oen.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s107956380 | p02541 | u867539710 | 1600629257 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9012 | 71 | n=int(input())
count=0
x=1
sm=1
while sm%n!=0:
x+=1
sm+=x
print(x) | File "/tmp/tmpf3_qmqjm/tmpyvyx8zny.py", line 7
sm+=x
TabError: inconsistent use of tabs and spaces in indentation
| |
s018127996 | p02542 | u941407962 | 1600686182 | Python | PyPy3 (7.3.0) | py | Runtime Error | 1425 | 102908 | 2813 |
import sys;input=sys.stdin.readline
from collections import deque, defaultdict
def encode(i, j):
return 2 + K + i*M + j
from heapq import heappush, heappop
class MinCostFlow:
INF = 10**18
def __init__(self, N):
self.N = N
self.G = [[] for i in range(N)]
def addEdge(self, fr, to, cap, ... | Traceback (most recent call last):
File "/tmp/tmp1a9psac8/tmpl3oj_tqi.py", line 68, in <module>
N, M = map(int, input().split())
^^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s962135297 | p02542 | u864197622 | 1600640404 | Python | Python (3.8.2) | py | Runtime Error | 849 | 64088 | 712 | from networkx import*
N, M = map(int, input().split())
X = [[0 if a == "#" else 1 if a == "." else 2 for a in input()] for _ in range(N)]
cnt = sum(sum([1 if a == 2 else 0 for a in x]) for x in X)
G = MultiDiGraph()
t = N * M
G.add_node(t, demand = cnt)
for i in range(N):
for j in range(M):
if X[i][j] == 0:... | Traceback (most recent call last):
File "/tmp/tmpg0ldqpii/tmp7r236iif.py", line 2, in <module>
N, M = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s951524513 | p02542 | u297574184 | 1600637911 | Python | PyPy3 (7.3.0) | py | Runtime Error | 89 | 74696 | 1678 | import networkx as nx
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**9)
def solve():
INF = float('inf')
def max2(x, y): return x if x >= y else y
N, M = map(int, input().split())
Sss = ['#'*(M+2)] + ['#'+input()+'#' for _ in range(N)] + ['#'*(M+2)]
poss = []
for i in range(1... | Traceback (most recent call last):
File "/tmp/tmpvexmsx27/tmp2uty3g24.py", line 68, in <module>
solve()
File "/tmp/tmpvexmsx27/tmp2uty3g24.py", line 11, in solve
N, M = map(int, input().split())
^^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s321416919 | p02542 | u325227960 | 1600637428 | Python | PyPy3 (7.3.0) | py | Runtime Error | 92 | 68784 | 5541 | import types
_atcoder_code = """
# Python port of AtCoder Library.
__version__ = '0.0.1'
"""
atcoder = types.ModuleType('atcoder')
exec(_atcoder_code, atcoder.__dict__)
_atcoder_maxflow_code = """
from __future__ import annotations
from typing import NamedTuple, Optional, List
class MFGraph:
class Edge(Named... | Traceback (most recent call last):
File "/tmp/tmphwn9_eum/tmpfbkkdxjp.py", line 164, in <module>
n,m = map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s307029842 | p02542 | u340781749 | 1600635075 | Python | Python (3.8.2) | py | Runtime Error | 259 | 105488 | 4591 | import os
import sys
from heapq import heappop, heappush
import numpy as np
def solve(n, m, field):
MINCOSTFLOW_LINKS = []
MINCOSTFLOW_LINK_INDICES = []
MINCOSTFLOW_CURRENT_LINK_INDEX = []
INF = 10 ** 10
def mincostflow_init(m):
""" m:辺数(逆辺除く) """
MINCOSTFLOW_LINKS.append(np.zero... | Traceback (most recent call last):
File "/tmp/tmp6_1n7vha/tmp8qfydrbi.py", line 148, in <module>
from my_module import solve
ModuleNotFoundError: No module named 'my_module'
| |
s268523972 | p02542 | u340781749 | 1600634654 | Python | Python (3.8.2) | py | Runtime Error | 285 | 105632 | 4621 | import os
import sys
from heapq import heappop, heappush
import numpy as np
def solve(n, m, field):
MINCOSTFLOW_LINKS = []
MINCOSTFLOW_LINK_INDICES = []
MINCOSTFLOW_CURRENT_LINK_INDEX = []
INF = 10 ** 10
def mincostflow_init(m):
""" m:辺数(逆辺除く) """
MINCOSTFLOW_LINKS.append(np.zero... | Traceback (most recent call last):
File "/tmp/tmpxnogtw78/tmpn991sosy.py", line 149, in <module>
from my_module import solve
ModuleNotFoundError: No module named 'my_module'
| |
s537202768 | p02542 | u994521204 | 1600633501 | Python | Python (3.8.2) | py | Runtime Error | 988 | 68204 | 806 | import networkx as nx
n, m = map(int, input().split())
S = [list(input()) for _ in range(n)]
G = nx.DiGraph()
start = (n, m)
cnt = 0
goal = (n, m + 1)
for i in range(n):
for j in range(n):
if S[i][j] != "#":
if S[i][j] == "o":
cnt += 1
G.add_edge(start, (i, j)... | Traceback (most recent call last):
File "/tmp/tmppmqqm7et/tmpn4t1znbf.py", line 3, in <module>
n, m = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s509077674 | p02542 | u994521204 | 1600633293 | Python | Python (3.8.2) | py | Runtime Error | 1031 | 68476 | 802 | import networkx as nx
n, m = map(int, input().split())
S = [list(input()) for _ in range(n)]
G = nx.DiGraph()
start = (n, n)
cnt = 0
goal = (n, n + 1)
for i in range(n):
for j in range(n):
if S[i][j] != "#":
if S[i][j] == "o":
cnt += 1
G.add_edge(start, (i, j)... | Traceback (most recent call last):
File "/tmp/tmpzqz3e06b/tmpg04w25ze.py", line 3, in <module>
n, m = map(int, input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s153736109 | p02542 | u994521204 | 1600633245 | Python | Python (3.8.2) | py | Runtime Error | 354 | 58084 | 848 | import networkx as nx
import sys
input = sys.stdin.buffer.readline
n, m = map(int, input().split())
S = [list(input()) for _ in range(n)]
G = nx.DiGraph()
start = (n, n)
cnt = 0
goal = (n, n + 1)
for i in range(n):
for j in range(n):
if S[i][j] != "#":
if S[i][j] == "o":
cnt... | Traceback (most recent call last):
File "/tmp/tmpuos27_zj/tmp439feazx.py", line 6, in <module>
n, m = map(int, input().split())
^^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s759766995 | p02546 | u793981991 | 1600719364 | Python | PyPy2 (7.3.0) | py | Runtime Error | 405 | 85680 | 575 | import os
import io
input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline
n, q = list(map(int, input().split()))
count = (n - 2) ** 2
c = [n] * n
r = [n] * n
mc = n
mr = n
for _ in range(q):
m,q = list(map(int, input().split()))
if m == 1:
pos = r[q-1]
if q < mc:
mc = q
for p in ran... | Traceback (most recent call last):
File "/tmp/tmpnjl3pco5/tmpvpml8qqu.py", line 6, in <module>
n, q = list(map(int, input().split()))
^^^^
ValueError: not enough values to unpack (expected 2, got 0)
| |
s976586160 | p02546 | u817565863 | 1600707832 | Python | Python (3.8.2) | py | Runtime Error | 30 | 8956 | 94 | p=input()
if p[len(p)-1]=='s':
p.append('es')
print(p)
else:
p.append('s')
print(p)
| Traceback (most recent call last):
File "/tmp/tmpbghvilec/tmpcu2lpqgn.py", line 1, in <module>
p=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s912385241 | p02546 | u224989615 | 1600702132 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9156 | 225 | n = int(input())
count = 0
for i in range(n):
d1, d2 = map(int, input().split())
if count > 2:
break
else:
if d1 == d2:
count += 1
else:
count = 0
if count > 2:
print("Yes")
else:
print("No") | Traceback (most recent call last):
File "/tmp/tmp88g_i70p/tmpq615fs32.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s942124955 | p02546 | u224989615 | 1600701823 | Python | PyPy3 (7.3.0) | py | Runtime Error | 94 | 74336 | 212 | n = int(input())
count = 0
for i in range(n):
d1, d2 = map(int, input().split())
if count > 2:
break
elif d1 == d2:
count += 1
else:
count == 0
if count > 2:
print("Yes")
else:
print("No") | Traceback (most recent call last):
File "/tmp/tmpe9e780rk/tmpf90s13ki.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s086544729 | p02546 | u224989615 | 1600701669 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9168 | 212 | n = int(input())
count = 0
for i in range(n):
d1, d2 = map(int, input().split())
if count > 2:
break
elif d1 == d2:
count += 1
else:
count == 0
if count > 2:
print("Yes")
else:
print("No") | Traceback (most recent call last):
File "/tmp/tmpzpi__c8e/tmp9pim_7j9.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s813446537 | p02546 | u224989615 | 1600701121 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9080 | 214 | n = int(input())
count = 0
for i in range(n):
d1, d2 = map(int, input().split())
if count == 3:
break
elif d1 == d2:
count += 1
else:
count == 0
if count == 3:
print("Yes")
else:
print("No") | Traceback (most recent call last):
File "/tmp/tmp6wfz7jnv/tmpu3os2zu2.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s762877870 | p02546 | u956223466 | 1600697845 | Python | Python (3.8.2) | py | Runtime Error | 22 | 8800 | 51 | w=input()
a='es' is w[-1]=='s' else 's'
print(w+a)
| File "/tmp/tmp30z2i1il/tmpnruf37ax.py", line 2
a='es' is w[-1]=='s' else 's'
^^^^
SyntaxError: invalid syntax
| |
s773060261 | p02546 | u956223466 | 1600697787 | Python | Python (3.8.2) | py | Runtime Error | 23 | 8796 | 42 | w=input()
a=w[-1]=='s'?'es':'s'
print(w+a) | File "/tmp/tmp6auwxl_m/tmp1t7yqbk4.py", line 2
a=w[-1]=='s'?'es':'s'
^
SyntaxError: invalid syntax
| |
s162093523 | p02546 | u689723321 | 1600697395 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8992 | 79 | S=input()
l=len(S)
s=list(S)
if s[l]=="s":
print(S+"es")
else:
print(S+"s") | Traceback (most recent call last):
File "/tmp/tmp_ad1qmh7/tmp1di1n7si.py", line 1, in <module>
S=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s650432712 | p02546 | u654571388 | 1600695379 | Python | Python (3.8.2) | py | Runtime Error | 30 | 8952 | 83 | val = input()
valf=val[-1]
if(valf==s):
print(val+"es")
else
print(val+"s") | File "/tmp/tmpqqsvcfj7/tmpjitsqtk6.py", line 5
else
^
SyntaxError: expected ':'
| |
s239189491 | p02546 | u005788584 | 1600693141 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8976 | 238 | nk=map(int,input().split())
a=[]
for i in range(k):
lr=map(int,input().split())
for i in range(l,r+1):
a.append(i)
a=list(set(a))
dp=[0]*n
dp[0]=1
for i in range(1,n):
for j in a:
if i>=j:
dp[i]+=dp[i-j]
print(dp[-1])
| Traceback (most recent call last):
File "/tmp/tmpnkovrx40/tmplydgl4y5.py", line 1, in <module>
nk=map(int,input().split())
^^^^^^^
EOFError: EOF when reading a line
| |
s031404546 | p02546 | u867616076 | 1600691450 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9048 | 76 | s = raw_input()
if(s[-1] == 's'):
s += 'es'
else:
s += 's'
print(s)
| Traceback (most recent call last):
File "/tmp/tmp2pkmhnzy/tmpck3djib6.py", line 1, in <module>
s = raw_input()
^^^^^^^^^
NameError: name 'raw_input' is not defined
| |
s783184437 | p02546 | u574888872 | 1600685195 | Python | Python (3.8.2) | py | Runtime Error | 69 | 16208 | 355 | from unittest import TestCase, main
from A import func
class test(TestCase):
def test_with_valid_params(self):
test_patterns = [
("apple","apples"),
("bus","buses"),
("box","boxs")
]
for S,result in test_patterns:
with self.subTest(S=S):
self.assertEqual(func(S),result)
... | Traceback (most recent call last):
File "/tmp/tmp088pr5ai/tmpwjm1ix9v.py", line 2, in <module>
from A import func
ModuleNotFoundError: No module named 'A'
| |
s593165411 | p02546 | u807772568 | 1600682441 | Python | PyPy3 (7.3.0) | py | Runtime Error | 92 | 74600 | 1336 | import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
return list(map(int,input().split()))
def m(): #複数文字
return map(int,input().split())
def onem(): #Nとかの取得
return int(input())
def s(x): #圧縮
a = []
if l... | Traceback (most recent call last):
File "/tmp/tmpjbtnl5r2/tmpn9oydzdd.py", line 65, in <module>
if n[-1] == "s":
~^^^^
IndexError: list index out of range
| |
s910199198 | p02546 | u840649762 | 1600673441 | Python | Python (3.8.2) | py | Runtime Error | 29 | 8948 | 395 | import random
exit = False
count = 0
countNum = 0
randomArray1 = random.randint(1,6)
randomArray2 = random.randint(1,6)
while count < 4:
randomArray1 = random.randint(1,6)
randomArray2 = random.randint(1,6)
print(randomArray1,randomArray2)
countNum += 1
if randomArray1 == randomArray2:
... | File "/tmp/tmpud9axnu5/tmplni1mgul.py", line 23
if count
^
SyntaxError: expected ':'
| |
s538877372 | p02546 | u267933821 | 1600669841 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9020 | 76 | S=input()
s=len(S)
if S[s] == "s":
print(S+"es")
else:
print(S+"s")
| Traceback (most recent call last):
File "/tmp/tmpxsspz7q1/tmpmi28mrqn.py", line 1, in <module>
S=input()
^^^^^^^
EOFError: EOF when reading a line
| |
s985345440 | p02546 | u313165242 | 1600652563 | Python | Python (3.8.2) | py | Runtime Error | 22 | 8880 | 96 | def change_code(src):
if src[:1] == s:
src=src + "es"
else:
src = src + "s"
return src | File "/tmp/tmplpsh9p8h/tmpzkg07dft.py", line 3
src=src + "es"
TabError: inconsistent use of tabs and spaces in indentation
| |
s341679771 | p02546 | u696886537 | 1600633207 | Python | Python (3.8.2) | py | Runtime Error | 31 | 8944 | 107 | f=open('in','r')
input=lambda:f.readline().strip()
s=input()
if s[-1]!='s':print(s+'s')
else:print(s+'es') | Traceback (most recent call last):
File "/tmp/tmpicnbwx1y/tmp2l0a5iw_.py", line 1, in <module>
f=open('in','r')
^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'in'
| |
s388133068 | p02546 | u883375836 | 1600620421 | Python | Python (3.8.2) | py | Runtime Error | 28 | 8956 | 74 | input=(S)
if S[-1]!="s":
print(S+"s")
elif S[-1]=="s":
print(S+"es") | Traceback (most recent call last):
File "/tmp/tmpa8rjhdmd/tmpb96lkfaa.py", line 1, in <module>
input=(S)
^
NameError: name 'S' is not defined
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.