s_id stringlengths 10 10 | p_id stringlengths 6 6 | u_id stringlengths 10 10 | date stringlengths 10 10 | language stringclasses 1
value | original_language stringclasses 11
values | filename_ext stringclasses 1
value | status stringclasses 1
value | cpu_time stringlengths 1 5 | memory stringlengths 1 7 | code_size stringlengths 1 6 | code stringlengths 1 539k |
|---|---|---|---|---|---|---|---|---|---|---|---|
s700209678 | p03789 | u021034020 | 1580346120 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2115 | 191868 | 341 | # coding: utf-8
# Your code here
def sum(x):
if x<10:
return x
return x%10+sum(x // 10)
x=input()
y=int(x)
y*=9
z=int(100000)
z*=z
i=y%z
i=z-i
i+=z
minu=z
while minu>=1:
if i<minu:
minu=minu // 10
continue
if sum(y+i-minu)<=(i-minu):
i-=minu
else:
minu=minu //... |
s716378274 | p03789 | u021034020 | 1580346076 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2115 | 191996 | 333 | # coding: utf-8
# Your code here
def sum(x):
if x<10:
return x
return x%10+sum(x//10)
x=input()
y=int(x)
y*=9
z=int(100000)
z*=z
i=y%z
i=z-i
i+=z
minu=z
while minu>=1:
if i<minu:
minu=minu//10
continue
if sum(y+i-minu)<=(i-minu):
i-=minu
else:
minu=minu//10
pr... |
s924692348 | p03789 | u021034020 | 1580346015 | Python | Python (3.4.3) | py | Runtime Error | 2117 | 215648 | 333 | # coding: utf-8
# Your code here
def sum(x):
if x<10:
return x
return x%10+sum(x//10)
x=input()
y=int(x)
y*=9
z=int(100000)
z*=z
i=y%z
i=z-i
i+=z
minu=z
while minu>=1:
if i<minu:
minu=minu//10
continue
if sum(y+i-minu)<=(i-minu):
i-=minu
else:
minu=minu//10
pr... |
s453148062 | p03789 | u703394155 | 1532728680 | Python | PyPy3 (2.4.0) | py | Runtime Error | 2122 | 315932 | 258 | def count(n):
if n < 10:
return n
else:
return count(n // 10) + n % 10
def check(k):
return k >= count(9 * n + k)
n = int(input())
l = 0
r = 555555
while r - l > 1:
mid = (l + r) // 2
if check(mid):
r = mid
else:
l = mid
print ((r + 8) // 9) |
s631449566 | p03791 | u102445737 | 1596492156 | Python | PyPy3 (7.3.0) | py | Runtime Error | 103 | 85060 | 623 | #from collections import deque,defaultdict
printn = lambda x: print(x,end='')
inn = lambda : int(input())
inl = lambda: list(map(int, input().split()))
inm = lambda: map(int, input().split())
ins = lambda : input().strip()
DBG = True # and False
BIG = 10**18
R = 10**9 + 7
#R = 998244353
def ddprint(x):
if D... |
s342087678 | p03791 | u310678820 | 1581801361 | Python | PyPy3 (2.4.0) | py | Runtime Error | 228 | 62704 | 294 | mod = 10**9+7
N = int(input())
x = list(map(int, input().split()))
ans = 1
cnt = 1
now = 0
while x[now]>=cnt*2-1:
cnt+=1
now+=1
ans*=cnt
ans%=mod
for i in range(1, N):
cnt-=1
while now<N-1 and x[now]>=cnt*2-1:
cnt+=1
now+=1
ans*=cnt
ans%=mod
print(ans)
|
s631216060 | p03791 | u368780724 | 1558500301 | Python | PyPy3 (2.4.0) | py | Runtime Error | 218 | 63468 | 321 | from itertools import accumulate
from bisect import bisect
N = int(input())
X = list(map(int, input().split()))
mod = 10**9+7
T = [2 + i - (1+x)//2 for i, x in enumerate(X)]
T = list(accumulate(T, max))
D = [min(1 + bisect(T, i), N) - i + 1 for i in range(1, N + 1)]
ans = 1
for d in D:
ans = (ans * d)%mod
print(ans... |
s617014352 | p03791 | u332385682 | 1488087596 | Python | PyPy3 (2.4.0) | py | Runtime Error | 266 | 44908 | 888 | import sys
from itertools import permutations
def debug(x, table):
for name, val in table.items():
if x is val:
print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
return None
def solve():
N = int(input())
assert N <= 8
X = [int(i) for i in input().split()]
... |
s389275228 | p03791 | u332385682 | 1488086443 | Python | PyPy3 (2.4.0) | py | Runtime Error | 268 | 45288 | 802 | import sys
from itertools import permutations
def debug(x, table):
for name, val in table.items():
if x is val:
print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
return None
def solve():
N = int(input())
assert N <= 8
X = [int(i) for i in input().split()]
... |
s107187929 | p03791 | u332385682 | 1488085861 | Python | PyPy3 (2.4.0) | py | Runtime Error | 279 | 46300 | 743 | import sys
from itertools import permutations
def debug(x, table):
for name, val in table.items():
if x is val:
print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
return None
def solve():
N = int(input())
assert N <= 8
X = [int(i) for i in input().split()]
... |
s254525191 | p03791 | u332385682 | 1488085716 | Python | PyPy3 (2.4.0) | py | Runtime Error | 182 | 39920 | 761 | import sys
from itertools import permutations
def debug(x, table):
for name, val in table.items():
if x is val:
print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
return None
def solve():
N = int(input())
assert N <= 8
X = [int(i) for i in input().split()]
... |
s970923850 | p03791 | u602740328 | 1488085654 | Python | Python (2.7.6) | py | Runtime Error | 229 | 16388 | 2089 | import numpy as np
import copy
def sampling_row(mat, row):
row_str = copy.deepcopy(mat[row, :])
return row_str
def writing_col(mat, row_str, col):
row = 0
for s in row_str:
mat[row, col] = s
row+=1
def check(mat, N):
max_val = 0
max_row = 0
max_col = 0
is_ok = Tru... |
s050255479 | p03791 | u332385682 | 1488081720 | Python | PyPy3 (2.4.0) | py | Runtime Error | 238 | 44652 | 962 | import sys
from itertools import permutations
def debug(x, table):
for name, val in table.items():
if x is val:
print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
return None
def solve():
N = int(input())
assert N <= 8
X = [int(i) for i in input().split()]
... |
s965203681 | p03791 | u332385682 | 1488081672 | Python | PyPy3 (2.4.0) | py | Runtime Error | 247 | 44652 | 962 | import sys
from itertools import permutations
def debug(x, table):
for name, val in table.items():
if x is val:
print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
return None
def solve():
N = int(input())
assert N <= 8
X = [int(i) for i in input().split()]
... |
s831121481 | p03791 | u332385682 | 1488081601 | Python | PyPy3 (2.4.0) | py | Runtime Error | 241 | 44908 | 962 | import sys
from itertools import permutations
def debug(x, table):
for name, val in table.items():
if x is val:
print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
return None
def solve():
N = int(input())
assert N <= 8
X = [int(i) for i in input().split()]
... |
s740476336 | p03791 | u332385682 | 1488081512 | Python | PyPy3 (2.4.0) | py | Runtime Error | 236 | 44908 | 925 | import sys
from itertools import permutations
def debug(x, table):
for name, val in table.items():
if x is val:
print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
return None
def solve():
N = int(input())
assert N <= 8
X = [int(i) for i in input().split()]
... |
s748421730 | p03791 | u556160473 | 1488081504 | Python | Python (3.4.3) | py | Runtime Error | 779 | 21696 | 893 | import numpy as np
def change(a,i,j,n):
b = a
imask = (2**n-1) << i*n
jmask = 0
for k in range(n):
jmask |= (1<<k*n+n-1-j)
buf = (a & imask) >> i*n
chg = 0
for k in range(n)[::-1]:
#print(bin(((buf&(1<<k))>>k)))
#print(bin(((buf&(1<<k))>>k)<<k*n+n-1-j))
chg... |
s122896317 | p03791 | u089177147 | 1488080578 | Python | Python (3.4.3) | py | Runtime Error | 71 | 13632 | 1032 | N = int(input())
A = [[0 if x == "." else 1 for x in input()] for i in range(N)]
if sum([sum(x) for x in A]) == 0:
print(-1)
else:
sum_list = [0] * N
for i in range(N):
s = 0
for j in range(N):
s += A[j][i]
sum_list[i] = s
count = N
index = []
flag2 = True
... |
s983171341 | p03791 | u439009525 | 1488080084 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 14180 | 298 | from math import factorial
N=int(input())
x_list=input().split()
x_list=[int(x) for x in x_list]
mod=10e9+7
ans=1
j=0
for n in range(N-1):
for i, x in enumerate(x_list[n+j:-1]):
if x<2*(i+j)+1:
ans=(ans*(i+j+1))%(mod)
j+=i
break
else:
ans=(ans*factorial(N-n))%mod
break
print(ans)
|
s998697844 | p03791 | u984351908 | 1488079997 | Python | Python (3.4.3) | py | Runtime Error | 101 | 14052 | 519 | def rec(x, xofs, goal):
num_of_x = len(x) - xofs
if num_of_x == 1:
return 1
elif num_of_x == 2:
return 2
elif x[xofs] == goal + 1 and x[xofs + 1] == goal + 2:
return (num_of_x - 2 + 1) * rec(x, xofs + 2, goal + 2) * 2
elif x[xofs] == goal + 1 or x[xofs] == goal + 2:
r... |
s697833825 | p03791 | u984351908 | 1488078963 | Python | Python (3.4.3) | py | Runtime Error | 75 | 14484 | 555 | def rec(x, xofs, goal):
num_of_x = len(x) - xofs
if num_of_x == 1:
return 1
elif num_of_x == 2:
return 2
elif x[xofs] == goal + 1 and x[xofs + 1] == goal + 2:
return (num_of_x - 2 + 1) * rec(x, xofs + 2, goal + 2) * 2
elif x[xofs] == goal + 1 or x[xofs] == goal + 2:
r... |
s489328000 | p03791 | u984351908 | 1488078771 | Python | Python (3.4.3) | py | Runtime Error | 106 | 14484 | 550 | def rec(x, xofs, goal):
num_of_x = len(x) - xofs
if num_of_x == 1:
return 1
elif num_of_x == 2:
return 2
elif x[xofs] == goal + 1 and x[xofs + 1] == goal + 2:
return (num_of_x - 2 + 1) * rec(x, xofs + 2, goal + 2) * 2
elif x[xofs] == goal + 1 or x[xofs] == goal + 2:
r... |
s177557920 | p03791 | u984351908 | 1488078689 | Python | Python (3.4.3) | py | Runtime Error | 73 | 14364 | 542 | def rec(x, xofs, goal):
num_of_x = len(x) - xofs
if num_of_x == 1:
return 1
elif num_of_x == 2:
return 2
elif x[xofs] == goal + 1 and x[xofs + 1] == goal + 2:
return (num_of_x - 2) * rec(x, xofs + 2, goal + 2) * 2
elif x[xofs] == goal + 1 or x[xofs] == goal + 2:
retur... |
s240920601 | p03791 | u984351908 | 1488078455 | Python | Python (3.4.3) | py | Runtime Error | 73 | 14484 | 567 | def rec(x, xofs, goal):
num_of_rest_x = len(x) - (xofs + 1)
if num_of_rest_x == 0:
return 1
elif num_of_rest_x == 1:
return 2
elif x[xofs] == goal + 1 and x[xofs + 1] == goal + 2:
return num_of_rest_x * rec(x, xofs + 2, goal + 2) * 2
elif x[xofs] == goal + 1 or x[xofs] == goa... |
s220800188 | p03791 | u984351908 | 1488078426 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 567 | def rec(x, xofs, goal):
num_of_rest_x = len(x) - (xofs + 1)
if num_of_rest_x == 0:
return 1
elif num_of_rest_x == 1:
return 2
elif x[xofs] == goal + 1 and x[xofs + 1] == goal + 2:
return num_of_rest_x * rec(x, xofs + 2, goal + 2) * 2
elif x[xofs] == goal + 1 or x[xofs] == goa... |
s586174235 | p03791 | u984351908 | 1488078182 | Python | Python (3.4.3) | py | Runtime Error | 100 | 14588 | 533 | def rec(x, xofs, goal):
num_of_rest_x = len(x) - (xofs + 1)
if num_of_rest_x == 0:
return 1
elif num_of_rest_x == 1:
return 2
elif x[xofs] == goal + 1 and x[xofs + 1] == goal + 2:
return num_of_rest_x * rec(x, xofs + 2, goal + 2) * 2
elif x[xofs] == goal + 1 or x[xofs] == goa... |
s823130953 | p03791 | u984351908 | 1488077954 | Python | Python (3.4.3) | py | Runtime Error | 102 | 14364 | 514 | def rec(x, xofs, goal):
num_of_rest_x = len(x) - (xofs + 1)
if num_of_rest_x == 0:
return 1
elif num_of_rest_x == 1:
return 2
elif x[xofs] == goal + 1 and x[xofs + 1] == goal + 2:
return num_of_rest_x * rec(x, xofs + 2, goal + 2) * 2
elif x[xofs] == goal + 1 or x[xofs] == goa... |
s387777435 | p03791 | u984351908 | 1488077804 | Python | Python (3.4.3) | py | Runtime Error | 100 | 14364 | 514 | def rec(x, xofs, goal):
num_of_rest_x = len(x) - (xofs + 1)
if num_of_rest_x == 0:
return 1
elif num_of_rest_x == 1:
return 2
elif x[xofs] == goal + 1 and x[xofs + 1] == goal + 2:
return num_of_rest_x * rec(x, xofs + 2, goal + 2) * 2
elif x[xofs] == goal + 1 or x[xofs] == goa... |
s236269767 | p03791 | u226155577 | 1488077762 | Python | Python (2.7.6) | py | Runtime Error | 55 | 11328 | 794 | n = input()
X = map(int, raw_input().split())
if n > 10:
exit(1)
cur = 1
for i in xrange(n):
if cur <= X[i]:
X[i] = cur
cur += 2
else:
cur = X[i]+2
ALL = 2**n-1
memo = {}
def dfs(state):
if state in memo:
return memo[state]
if state == ALL:
return 1
Y =... |
s182111937 | p03791 | u408800699 | 1488077654 | Python | Python (3.4.3) | py | Runtime Error | 23 | 5756 | 768 | def solve_loop(s):
count = 0
while len(s) > 1 and count < 100:
s = solve(s)
count += 1
return s
def solve(s):
for i in range(0, len(s)-1):
if s[i] == s[i+1]:
if s[i] == 'z':
s = s.replace(s[i:i+2], '')
else:
next_chr = chr(... |
s188741692 | p03791 | u984351908 | 1488077189 | Python | Python (3.4.3) | py | Runtime Error | 2110 | 216196 | 514 | def rec(x, xofs, goal):
num_of_rest_x = len(x) - (xofs + 1)
if num_of_rest_x == 0:
return 1
elif num_of_rest_x == 1:
return 2
elif x[xofs] == goal + 1 and x[xofs + 1] == goal + 2:
return num_of_rest_x * rec(x, xofs + 2, goal + 2) * 2
elif x[xofs] == goal + 1 or x[xofs + 1] ==... |
s441413686 | p03792 | u905582793 | 1579281821 | Python | Python (3.4.3) | py | Runtime Error | 33 | 5364 | 334 | n=int(input())
a=[list(input()) for i in range(n)]
if max([a[i].count("#") for i in range(n)]) ==0:
print(-1)
exit()
minus=0
for i in range(n):
if a[i].count(".")==0:
minus=n
break
if a[i][i]=="#":
minus=max(minus,a[i].count("#"))
b=zip(*a)
for j in range(n):
if b[j].count(".")==0:
minus+=1
pr... |
s376121331 | p03792 | u905582793 | 1579281725 | Python | Python (3.4.3) | py | Runtime Error | 34 | 5364 | 332 | n=int(input())
a=[list(input()) for i in range(n)]
if max(a[i].count("#") for i in range(n)) ==0:
print(-1)
exit()
minus=0
for i in range(n):
if a[i].count(".")==0:
minus=n
break
if a[i][i]=="#":
minus=max(minus,a[i].count("#"))
b=zip(*a)
for j in range(n):
if b[j].count(".")==0:
minus+=1
prin... |
s143517665 | p03792 | u905582793 | 1579281554 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 351 | n=int(input())
a=[list(map(int,input().split())) for i in range(n)]
if max(a[i].count(".") for i in range(n)) ==0:
print(-1)
exit()
minus=0
for i in range(n):
if a[i].count(".")==0:
minus=n
break
elif a[i][i]=="#":
minus=max(minus,a[i].count("#"))
b=zip(*a)
for j in range(n):
if b[j].count(".")==0... |
s367218519 | p03792 | u271539660 | 1488084592 | Python | Python (3.4.3) | py | Runtime Error | 99 | 3316 | 626 | N = int(input().strip())
ar = [N*[] for _ in range(N)]
for row in range(N):
ar[row] = input().strip()
count = N*[0]
fullestRow = -1
maxCount = 0
for row in range(N):
for col in range(N):
if ar[row][col] == '#':
count[row] += 1
if count[row] > maxCount:
maxCount = count[row]
fullestRow = row
if... |
s005655421 | p03792 | u271539660 | 1488084304 | Python | Python (3.4.3) | py | Runtime Error | 108 | 11252 | 708 | N = int(input().strip())
ar = [N*[] for _ in range(N)]
for row in range(N):
ar[row] = list(input().strip())
count = N*[0]
missing = [N*[] for _ in range(N)]
fullestRow = -1
maxCount = 0
for row in range(N):
for col in range(N):
if ar[row][col] == '#':
count[row] += 1
else:
missing[row].append(c... |
s533229803 | p03792 | u663710122 | 1488081496 | Python | Python (3.4.3) | py | Runtime Error | 30 | 3828 | 919 | from collections import deque
def count(board: list):
ret = 0
for row in board:
for cell in row:
if cell == '#':
ret += 1
return ret
N = int(input())
A = []
d = {}
if n > 3 : exit()
for i in range(N):
A.append(input())
if count(A) == 0:
print(-1)
exit()... |
s713355862 | p03792 | u556160473 | 1488077098 | Python | Python (3.4.3) | py | Runtime Error | 1601 | 17068 | 726 | import numpy as np
def change(a, i, j):
b = np.copy(a)
b[:,j] = b[i,:]
return b
def isTrue(maxiter, current, a):
n = a.shape[0]
if np.all(a):
return current
current += 1
ret = maxiter+1
if maxiter < current:
return ret
for i in range(n):
for j in range(n):
... |
s602369835 | p03792 | u226155577 | 1488076218 | Python | Python (2.7.6) | py | Runtime Error | 17 | 3320 | 612 | from collections import deque
n = input()
A = ''.join(raw_input() for i in xrange(n))
if n > 5:
exit(1)
ALL = "#"*(n*n)
deq = deque()
deq.append((A, 0))
memo = {}
while deq:
state, cost = deq.popleft()
if state == ALL:
print cost
break
if state in memo:
continue
s = list(... |
s499118014 | p03792 | u478870821 | 1488076135 | Python | Python (3.4.3) | py | Runtime Error | 250 | 4068 | 718 | from sys import exit, setrecursionlimit
from functools import reduce
from itertools import *
from collections import defaultdict, deque
from bisect import bisect
def read():
return int(input())
def reads():
return [int(x) for x in input().split()]
setrecursionlimit(1000000)
N = read()
L = N * N
assert(N <= 3)
... |
s441172503 | p03792 | u226155577 | 1488075778 | Python | Python (2.7.6) | py | Runtime Error | 18 | 3204 | 673 | n = input()
A = ''.join(raw_input() for i in xrange(n))
if n > 5:
exit(1)
ALL = "#"*(n*n)
memo = {}
def dfs(state):
if state in memo:
return memo[state]
if state == ALL:
return 0
s = list(state)
memo[state] = res = 10**9
for i in xrange(n):
C = [state[i*n+k] for k in x... |
s468798951 | p03792 | u226155577 | 1488074944 | Python | Python (2.7.6) | py | Runtime Error | 17 | 3204 | 607 | n = input()
A = ''.join(raw_input() for i in xrange(n))
if n > 5:
exit(1)
ALL = "#"*(n*n)
memo = {}
def dfs(state):
if state in memo:
return memo[state]
if state == ALL:
return 0
s = list(state)
memo[state] = res = 10**9
for i in xrange(n):
C = [state[i*n+k] for k in x... |
s200100695 | p03793 | u518765149 | 1488085458 | Python | Python (2.7.6) | py | Runtime Error | 2224 | 2003664 | 1962 | def stringProcessor(sequence):
for i in range(0, len(sequence) - 1):
if sequence[i] == sequence[i + 1]:
if sequence[i] == ord('z'): ... |
s300910717 | p03793 | u243492642 | 1488081545 | Python | Python (3.4.3) | py | Runtime Error | 2105 | 65356 | 1342 | # coding: utf-8
str_que = list(input())
num_que = int(input())
l_que = [list(map(int, input().split())) for i in range(num_que)]
print(str_que)
print(num_que)
print(l_que)
l_alp = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
n_ind = 0
... |
s680577753 | p03793 | u060404587 | 1488078884 | Python | Python (2.7.6) | py | Runtime Error | 324 | 22144 | 1120 | enter = raw_input()
Q = int(raw_input())
que = []
for i in range(Q):
que.append(map(int, raw_input().split()))
que = [[1, 7], [2, 6]]
list = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
for i in range(Q):
start = que[i][0]-1
end = que[i][1]
s... |
s945821810 | p03793 | u886790158 | 1488076444 | Python | Python (3.4.3) | py | Runtime Error | 19 | 4596 | 1102 |
def proc(s, s_old):
arg = -1
for i in range(len(s)-1):
if s[i] == s[i+1]:
arg = i
break
if arg == -1 or len(s) < 2:
"""
ti=ti+1 であるような最小の i を選ぶ。
そのような i が存在しない場合、処理を終える。
"""
return s
if s[arg] == 'z':
"""
ti が z... |
s778143411 | p03793 | u886790158 | 1488076317 | Python | Python (3.4.3) | py | Runtime Error | 1412 | 401712 | 1023 |
def proc(s):
arg = -1
for i in range(len(s)-1):
if s[i] == s[i+1]:
arg = i
break
if arg == -1 or len(s) < 2:
"""
ti=ti+1 であるような最小の i を選ぶ。
そのような i が存在しない場合、処理を終える。
"""
return s
if s[arg] == 'z':
"""
ti が z である場合、... |
s642405154 | p03793 | u886790158 | 1488075881 | Python | Python (3.4.3) | py | Runtime Error | 1414 | 401712 | 550 |
def proc(s):
arg = -1
for i in range(len(s)-1):
if s[i] == s[i+1]:
arg = i
break
if arg == -1 or len(s) < 2:
return s
if s[arg] == 'z':
s = s[0:arg] + s[arg+2:]
else:
c = S[S.index(s[arg])+1]
s = s[0:arg] + c + s[arg+2:]
retu... |
s387276933 | p03793 | u886790158 | 1488075616 | Python | Python (3.4.3) | py | Runtime Error | 1400 | 401708 | 537 |
def proc(s):
arg = -1
for i in range(len(s)-1):
if s[i] == s[i+1]:
arg = i
break
if arg == -1:
return s
if s[arg] == 'z':
s = s[0:arg] + s[arg+2:]
else:
c = S[S.index(s[arg])+1]
s = s[0:arg] + c + s[arg+2:]
return proc(s)
S... |
s292744009 | p03794 | u111605722 | 1596489740 | Python | Python (3.8.2) | py | Runtime Error | 32 | 9016 | 9 | print "j" |
s479647514 | p03794 | u880644800 | 1488081601 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3192 | 2965 | def build_graph(inp):
nodes = dict()
names = dict()
N = None
for line in inp:
# special handling for first line of input -- seed vertices
if N is None:
N = int(line.strip())
for k in range(1, N + 1):
nodes[k] = set()
names[id(nodes... |
s797103490 | p03795 | u521323621 | 1601044511 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9120 | 42 | n = int(input())
input(x - 200 * (x//15)) |
s967670996 | p03795 | u434630332 | 1600062581 | Python | Python (3.8.2) | py | Runtime Error | 20 | 8904 | 95 | if n >= 15:
x = n * 800
y = ( n // 15 ) * 200
print(x - y)
else:
print(n * 800) |
s625095501 | p03795 | u886902015 | 1599857895 | Python | Python (3.8.2) | py | Runtime Error | 22 | 8956 | 38 | n=int(input())
print(800*n-200*(n//15) |
s516774004 | p03795 | u261696185 | 1599139521 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9056 | 206 | n = int(input())
x = 800 * n # 払った金額
# レストランからもらう金額
if n >= 15:
y = 200 * (n//15)
# 払った金額 - レストランからもらうお金
ans = x - y
print(ans) |
s538070835 | p03795 | u645281160 | 1598997433 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9132 | 4 | test |
s858072672 | p03795 | u076363290 | 1598580726 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8888 | 251 | N = int(input())
x = 800*N
if 15 <= N <30 :
y = 200
elif 30<= N <45:
y = 400
elif 45 <= N <60:
y = 600
elif 60 <= N < 75:
y = 800
elif 75 <= N < 90:
y = 1000
elif 90 <= N < 100:
y = 1200
elif N ==100:
y = 1200
print(x - y) |
s987898424 | p03795 | u076363290 | 1598580645 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9116 | 286 | N = int(input())
x = 800*N
if 15 <= int(N) <30 :
y = 200
elif 30<= int(N) <45:
y = 400
elif 45 <= int(N) <60:
y = 600
elif 60 <= int(N) < 75:
y = 800
elif 75 <= int(N) < 90:
y = 1000
elif 90 <= int(N) < 100:
y = 1200
elif int(N) ==100:
y = 1200
print(x - y) |
s243367396 | p03795 | u546853743 | 1598387452 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8968 | 56 | n = int,input()
k = int(n/15)
x = 800*n - 200*k
print(x) |
s247251885 | p03795 | u546853743 | 1598387378 | Python | Python (3.8.2) | py | Runtime Error | 23 | 8840 | 51 | n = int,input()
k = n/15
x = 800*n - 200*k
print(x) |
s992000794 | p03795 | u526818929 | 1598326299 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9036 | 44 | x = N * 800
y = (N // 15) * 200
print(x - y) |
s225344017 | p03795 | u559313689 | 1598207073 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9060 | 206 | N= int(input())
x= 800 * N
if N < 15:
y = 0
if 15 <= N < 30:
y = 200
if 30 <= N < 45:
y = 400
if 45 <= N < 60:
y = 600
if 60 <= N < 75:
y = 800
if 75 <= N < 100:
y = 1000
print(x-y) |
s119714546 | p03795 | u911516631 | 1596144201 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8996 | 162 | #include <stdio.h>
int main(void) {
int N;
scanf("%d", &N);
int x = 800 * N;
int y = N / 15 *200;
int ans = x - y;
printf("%d\n", ans);
return 0;
} |
s708154500 | p03795 | u334700364 | 1594711632 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9024 | 116 | n = int(input())
meal_price = n * 15
meal_discount_count = n // 15
return meal_price - (meal_discount_count * 200) |
s426217533 | p03795 | u548775658 | 1594350321 | Python | Python (3.8.2) | py | Runtime Error | 24 | 8916 | 69 | N = map(int, input())
n = N // 15
x = 800 * N
y = 200 * n
print(x-y) |
s020122386 | p03795 | u445509700 | 1592481295 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 106 | i = int(input())
d = i * 800
b = i // 15
if 0 < b:
c = d - (200 * b)
print(c)
else:
print(c)
|
s235196926 | p03795 | u955691979 | 1591846930 | Python | PyPy3 (2.4.0) | py | Runtime Error | 173 | 38256 | 45 | n = int(input())
print(800*n - int(n/15)200) |
s100966197 | p03795 | u212246706 | 1589831667 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 110 | N = input()
x = N*800
y = 0
for i in range(N+1):
if i % 15 == 0:
y = y + 200
ans = x-y
print(ans) |
s885957742 | p03795 | u212246706 | 1589831231 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 57 | x = 800*N
y = 0
if N % 15 ==0:
y = y + 200
print(x-y) |
s990697551 | p03795 | u854992222 | 1589723959 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 55 | n, x = map(int, input().split())
print(n*800-n//15*200) |
s921617388 | p03795 | u600261652 | 1588442891 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 64 | import math
N = int(input())
print(math.factrial(N) % (10**9+7)) |
s477895654 | p03795 | u429029348 | 1588367703 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 55 | n=int(input())
x=800*N
y=200*(n//15)
ans=x-y
print(ans) |
s346431735 | p03795 | u516447519 | 1588301913 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 4881 | N = int(input())
s = str(input())
A = ''
def majikayo():
k = 0
if A[0] == 'S' and s[0] == 'o':
if A[1] == A[-1]:
if A[-1] = 'S' and s[-1] == 'o':
if A[0] == A[-2]:
k = 1
elif A[-1] = 'S' and s[-1] == 'x':
if A[0] != A[-2]:
... |
s275817136 | p03795 | u624613992 | 1588043151 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 112 | n = int(input())
a,b = divmod(n,15)
print(n*800 - 200*a)n = int(input())
a,b = divmod(n,15)
print(n*800 - 200*a) |
s354397161 | p03795 | u836737505 | 1588035705 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 47 | n = int(input())
print((800*n) - (n//15*200)) |
s519213166 | p03795 | u507116804 | 1587420499 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 47 | n = input(int())
N = n//15
print(n*800-200*N) |
s575902436 | p03795 | u566321790 | 1587235730 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 83 | meals = int(input)
price15 = (15*800)-200
print((meals//15)*price15+800*(meals%15)) |
s442705243 | p03795 | u075304271 | 1586828926 | Python | PyPy3 (2.4.0) | py | Runtime Error | 166 | 38256 | 79 | n = int(input())
p = 1
for i in range(1,n+1):
p *= i
p = p % (10**9+7)
print(p) |
s321148771 | p03795 | u652656291 | 1586827786 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 39 | a = int(input)
print(a*800-(a//15)*200) |
s968402261 | p03795 | u102960641 | 1586563288 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 451 | n = int(input())
s = input()
seed1 = ["S","W"]
ans = ["SS","SW","WS","WW"]
for i in s[1:]:
for k,v in enumerate(ans):
now = 0 if i == "o" else 1
now = (now + seed1.index(v[-1]) + seed1.index(v[-2])) % 2
if now:
ans[k] += "W"
else:
ans[k] += "S"
for i in ans:
... |
s500271305 | p03795 | u706159977 | 1585694557 | Python | Python (3.4.3) | py | Runtime Error | 296 | 21620 | 148 | import numpy as np
n,m=map(int, input().split())
if n>=m/2:
m_fin = m//2
print(m_fin)
else:
m_aft = m -2*n
m_fin = m_aft//4
print(n+m_fin) |
s354661866 | p03795 | u706159977 | 1585694511 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 190 | import numpy as np
n,m=map(int, input().split())
if n>=m/2:
m_fin = m//2
print(m_fin)
else:
m_aft = m -2*n
m_fin = m_aft//4
print(n+m_fin) |
s707263272 | p03795 | u706159977 | 1585694476 | Python | Python (3.4.3) | py | Runtime Error | 337 | 21608 | 137 | import numpy as np
n,m=map(int, input().split())
if n>=m/2:
print(m//2)
else:
m_aft = m -2*n
m_fin = m_aft//4
print(n+m_fin) |
s702809026 | p03795 | u706159977 | 1585694436 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 230 | import numpy as np
n,m=map(int, input().split())
if n>=m/2:
m_fin = m//2
print(m_fin)
else:
m_aft = m -2*n
m_fin = m_aft//4
print(n+m_fin) |
s845930978 | p03795 | u706159977 | 1585694395 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 172 | import numpy as np
n,m=map(int, input().split())
if n>=m/2:
print("m//2")
else:
m_aft = m -2*n
m_fin = m_aft//4
print(n+m_fin) |
s465971128 | p03795 | u706159977 | 1585694342 | Python | Python (3.4.3) | py | Runtime Error | 323 | 22024 | 134 | import numpy as np
n,m=map(int, input().split())
if n>=m/2:
print(m//2)
else:
m_aft = m -2*n
m_fin = m_aft//4
print(n+m_fin) |
s333180352 | p03795 | u516566941 | 1585109896 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 176 | S = list(map(int,input().split()))
N=S[0]
M=S[1]
N1=0
M1=0
count = 0
if 2*N<=M:
count = N
N1=0
M1=M-2*N
count+=M1//4
elif M<2*N:
count += M//2
print(count) |
s031391465 | p03795 | u516566941 | 1585109377 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 168 | S = list(map(int,input().split()))
N=S[0]
M=S[1]
N1=0
M1=0
count = 0
if N<2*M:
count = N
N1=0
M1=M-2*N
count+=M1//4
else:
count += M//2
print(count) |
s617188010 | p03795 | u516566941 | 1585109077 | Python | Python (3.4.3) | py | Runtime Error | 16 | 3064 | 427 | S = list(map(int,input().split()))
N=S[0]
M=S[1]
N1=0
M1=0
count = 0
if N<2*M:
count += N
N1=0
M1=M-2*N
else:
count += M//2
N1 =N-M//2
M1 =M-(M//2)*2
for i in range(N1):
if N1 ==0 or M1<=1:
break
N1=N1-1
M1=M1-2
count += 1
if N1==0:
for i in range(M1):
if... |
s443857757 | p03795 | u346677493 | 1584892811 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 60 | n=map(int,raw_input().split())
x=800*n
y=200(n/15)
print x-y |
s948183144 | p03795 | u346677493 | 1584892775 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 39 | n=input()
x=800*n
y=200(n/15)
print x-y |
s106237507 | p03795 | u346677493 | 1584892676 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 35 | N=input()
print (800*N) - 200(N/15) |
s977469671 | p03795 | u346677493 | 1584892600 | Python | Python (2.7.6) | py | Runtime Error | 11 | 2568 | 44 | n=raw_input().split()
print 800*n -200(n/15) |
s098192919 | p03795 | u346677493 | 1584892518 | Python | Python (2.7.6) | py | Runtime Error | 11 | 2568 | 35 | n=input()
print 800*n -200(n/15)
|
s005284485 | p03795 | u223663729 | 1584334866 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 42 | n = int(input())
print(800*n - 200(n//15)) |
s839535632 | p03795 | u634248565 | 1582738278 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 47 | N = int(input())
x = N - ((N/15)200)
print (x) |
s938849096 | p03795 | u987170100 | 1582497350 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 153 | N, M = map(int, input().split())
if N == 0:
print(0)
elif N >= M:
print(M // 2)
else:
ret = N
M -= N * 2
ret += M // 4
print(ret) |
s087816030 | p03795 | u059684599 | 1582445296 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 46 | print(800*int(input())-200*(int(input())//15)) |
s767393533 | p03795 | u059684599 | 1582445221 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 35 | print(800*int(input())-200*(n//15)) |
s157573528 | p03795 | u217627525 | 1582017166 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 39 | n=int(input())
print(x*800-(x//15)*200) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.