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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s387294838 | p03471 | u812576525 | 1576958831 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 406 | ,y = map(int,input().split())
ans = 0
for i in range(1000):
if ans != 0:
break
else:
for j in range(1000):
for k in range(1000):
if (i + k + j)== n and (10000*i + 5000*j + 1000*k) == y:
print(i,j,k)
ans +=1
else... |
s325224347 | p03471 | u556215526 | 1576910039 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3060 | 263 | import sys
N,Y = map(int,input().split())
for i in range(N+1):
if Y < i * 10000:
continue
for j in range(N+1):
if N == i + j + k and Y == i * 10000 + j * 5000 + k * 1000:
print(i,j,k)
sys.exit()
print("-1 -1 -1")
|
s313714257 | p03471 | u556215526 | 1576909452 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 449 | import sys
N,Y = map(int,input().split())
for i in range(N+1):
if Y < i * 10000:
continue
for j in range(N+1):
if N < i + j or Y < i * 10000 + 5000 * j:
break
for k in range(N+1):
if N < i + j + k or Y < i * 10000 + j * 5000 + k * 1000:
break
... |
s057883159 | p03471 | u556215526 | 1576909403 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 428 | import sys
N,Y = map(int,input().split())
for i in range(N+1):
if Y < i * 10000:
continue
for j in range(N+1):
if N < i + j or Y < i * 10000 + 5000 * j:
break
for k in range(N+1):
if N < i + j + k or Y < i * 10000 + j * 5000 + k * 1000:
if N == i + j ... |
s257198309 | p03471 | u955481356 | 1576722626 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 241 | n, y = map(int, input().split())
res_a, res_b, res_c = -1
for i in range(n):
for j in range(n):
if 10000*i + 5000*j + 1000*(n-i-j) == y:
res_a, res_b, res_c = i, j, n-i-j
break
print(res_a, res_b, res_c) |
s106681254 | p03471 | u955481356 | 1576722519 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 258 | n, y = map(int, input().split())
res_a = -1
res_b = -1
res_c = -1
for i in range(n):
for j in range(n):
if 10000*i + 5000*j + 1000*k == y and i+j+k == n:
res_a, res_b, res_c = i, j, n-i-j
break
print(res_a, res_b, res_c) |
s491712312 | p03471 | u955481356 | 1576722457 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 289 | ソースコード
Copy
Copy
n, y = map(int, input().split())
res_a = -1
res_b = -1
res_c = -1
for i in range(n):
for j in range(n):
if 10000*i + 5000*j + 1000*k == y and i+j+k == n:
res_a, res_b, res_c = i, j, n-i-j
break
print(res_a, res_b, res_c) |
s410814937 | p03471 | u873616440 | 1576099228 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 248 | N, Y = map(int, input().split())
done = False
for i in range(N+1):
a = i
for j in (N+1-a):
b = j
c = N -i -j
sum = 10000*a + 5000 * b + 1000 *c
if sum == Y:
done = True
print(a, b, c)
if not done:
print(-1, -1, -1) |
s628565218 | p03471 | u705857261 | 1576035318 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 422 | #!/usr/bin/env python
n, y = map(int, input().split())
# print(n, y)
found = False
for i in range(n+1):
for j in range(n+1):
for k in range(n+1):
if 10000 * i + 5000 * j + 1000 * k == y and i + j + k == n:
found = True
print(f"{i} {j} {k}")
break... |
s032085357 | p03471 | u705857261 | 1576035084 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 417 | #!/usr/bin/env python
n, y = map(int, input().split())
# print(n, y)
flag = False
for i in range(n+1):
for j in range(n+1):
for k in range(n+1):
if 10000 * i + 5000 * j + 1000 * k == y and i + j + k == n:
flag = True
print(f"{i} {j} {k}")
break
... |
s067408410 | p03471 | u007263493 | 1575848820 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3060 | 185 | n,y = map(int, input(),split())
for i in range(n+1):
for j in range(n-i+1):
if k-10000*i-5000*j == 1000*(n-i-j):
print(i,j,n-i-j)
exit()
print(-1,-1,-1) |
s047177440 | p03471 | u963343620 | 1575769928 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 250 | for noguchi in range(n + 1):
for higuchi in range(n + 1 - noguchi):
yukichi = n - noguchi - higuchi
if noguchi + higuchi * 5 + yukichi * 10 == yen:
print(yukichi, higuchi, noguchi)
exit(0)
print("-1 -1 -1") |
s968032589 | p03471 | u727787724 | 1575745721 | Python | Python (3.4.3) | py | Runtime Error | 553 | 3064 | 225 | n,y=map(int,input().split())
ans=[-1,-1,-1]
for i in range(n+1):
for j in range(n-i+1):
if y-10000*i-5000*j==1000*(n-i-j):
ans=[i,j,n-i-j]
print(ans[1],ans[2],ans[3])
exit()
print(ans[1],ans[2],ans[3]) |
s810791146 | p03471 | u727787724 | 1575745604 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 231 | n,y=map(int,input().split())
ans=[-1,-1,-1]
for i in range(n+1):
for j in range(n-i+1):
if y-10000*i-5000*j==1000*(n-i-j):
ans=[i,j,n-i-j]
print(ans[1],ans[2],ans[3])
exit()
print(ans[1],ans[2],ans[3]) |
s755152314 | p03471 | u226912938 | 1575674406 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 233 | n, y = map(int, input().split())
ans = '-1 -1 -1'
for i in range(n+1):
for j in range(n-i+1):
k = n - i + j:
if i*10000 + j*5000 + k*1000 == y:
ans = str(i) + ' ' + str(j) + ' ' + str(k)
print(ans)
|
s134659669 | p03471 | u388719350 | 1575437765 | Python | PyPy3 (2.4.0) | py | Runtime Error | 187 | 38384 | 309 | (N, Y) = map(int, input().split(" "))
ans = '-1 -1 -1'
for x in range(0, N+1):
y = (Y / 1000 - 9 * x - N) / 4
if 0 <= y <= N:
if y.is_integer():
y = int(y)
z = N - x - y
if 0 <= z <= N:
ans = f'{x} {y} {z}'
break
print(ans)
|
s918958414 | p03471 | u716530146 | 1575324939 | Python | Python (3.4.3) | py | Runtime Error | 21 | 3188 | 156 | n,y=map(int,input())
for i in range(n):
for j in range(i,n):
k=n-i-j
if i*10000+j*5000+k*1000==y:
print(i,j,k)
exit()
print(-1,-1,-1)
|
s218514728 | p03471 | u326757732 | 1575112388 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 203 | N,Y = map(int,input().split())
ans = "-1 -1 -1"
for i in range(N+1):
for j in range(N+1-j):
if 0 <= Y - 10000*i - 5000*j <= 500*(N - i - j):
print(i+" "+j+" "+N-i-j)
exit()
print(ans) |
s229529397 | p03471 | u396890425 | 1575047416 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 298 | N,Y=map(int,input().split())
res10000=-1
res5000=-1
res1000=-1
for a in range(0,N+1):
for b in range(0,N-a+1):
total=a*10000+b*5000+(N-a-b)*1000
if total == Y:
res10000=a
res5000=b
res1000=N-a-b
print(res10000,res5000,res1000)) |
s453415606 | p03471 | u777283665 | 1574988682 | Python | Python (3.4.3) | py | Runtime Error | 19 | 2940 | 209 | n, y = map(int, input().split())
for i in range(n+1):
for j in range(n-i+1):
if 10000 * a + 5000 + b + 1000 * (n-(a+b)) == y:
print(a, b, n-(a+b))
exit()
print(-1, -1, -1) |
s950390797 | p03471 | u774160580 | 1574984550 | Python | Python (3.4.3) | py | Runtime Error | 851 | 3060 | 445 | N, Y = list(map(int, input().split()))
ans = []
for i_yukichi in range(N + 1):
for j_higuchi in range(N + 1 - i_yukichi):
k_noguchi = N - i_yukichi - j_higuchi
if 10000 * i_yukichi + 5000 * j_higuchi + 1000 * k_noguchi == Y:
ans.append(i_yukichi)
ans.append(j_higuchi)
... |
s487589122 | p03471 | u151305655 | 1574974438 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 224 | n, y = (int(i) for i in input().split())
a=-1
b=-1
c=-1
for i in range(n+1):
for j in range(n-i+1):
if 10000*i+5000*j+1000*(n-i-j+1)==y:
a=i
b=j
c=n-i+j+1
break
print(a b c) |
s435015550 | p03471 | u151305655 | 1574974397 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 223 | n,y = (int(_) for _ in input().split())
a=-1
b=-1
c=-1
for i in range(n+1):
for j in range(n-i+1):
if 10000*i+5000*j+1000*(n-i-j+1)==y:
a=i
b=j
c=n-i+j+1
break
print(a b c) |
s053389848 | p03471 | u151305655 | 1574974098 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 211 | n=int(input())
y=int(input())
a=-1
b=-1
c=-1
for i in range(n+1):
for j in range(n-i+1):
if 10000*i+5000*j+1000*(n-i-j+1)==y:
a=i
b=j
c=n-i+j+1
break
print(a b c) |
s327466363 | p03471 | u151305655 | 1574973999 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 233 | n=int(input())
y=int(input())
a=-1
b=-1
c=-1
for i in range(n+1):
for j in range(n+1):
for k in range(n+1):
if n==i+j+k and 10000*i+5000*j+1000*k==y:
a=i
b=j
c=k
break
print(a b c) |
s989814826 | p03471 | u151305655 | 1574973930 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 233 | n=int(input())
y=int(input())
a=-1
b=-1
c=-1
for i in range(n+1):
for j in range(n+1):
for k in range(n+1):
if n==i+j+k and 10000*i+5000*j+1000*k==y:
a=i
b=j
c=k
break
print(a b c) |
s412717424 | p03471 | u151305655 | 1574973821 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 227 | n=int(input())
y=int(input())
a=-1
b=-1
c=-1
for i in range(n):
for j in range(n):
for k in range(n):
if n==i+j+k and 10000*i+5000*j+1000*k==y:
a=i
b=j
c=k
break
print(a b c) |
s427395466 | p03471 | u007018214 | 1574888699 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 202 | n = int(input()) #お札の枚数
p = int(input()) #目標金額
x = p//10000
y = (p - x*10000)//5000
z = int((p - x*10000 - y*5000)/1000)
if x+z+y>n:
x = y = z = -1
print('{} {} {}'.format(x,y,z)) |
s009755349 | p03471 | u323374686 | 1574583053 | Python | PyPy3 (2.4.0) | py | Runtime Error | 164 | 38256 | 540 | count = list(map(int, input().split()))[0]
y = list(map(int, input().split()))[1]
from math import floor
l_lim = floor(y / 10000)
m_lim = floor(y / 5000)
n_lim = floor(y / 1000)
flag = False
for l in range(l_lim + 1):
for m in range(m_lim + 1):
for n in range(n_lim + 1):
if (l+m+n == count)&(1... |
s456613143 | p03471 | u323374686 | 1574582645 | Python | PyPy3 (2.4.0) | py | Runtime Error | 176 | 38384 | 431 | count = list(map(int, input().split()))[0]
y = list(map(int, input().split()))[1]
from math import floor
import sys
l_lim = floor(y / 10000)
m_lim = floor(y / 5000)
n_lim = floor(y / 1000)
for l in range(l_lim + 1):
for m in range(m_lim + 1):
for n in range(n_lim + 1):
if (l+m+n == count)&(100... |
s073400283 | p03471 | u798731634 | 1574387451 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 224 | n, y = map(int, input().split())
z = y/1000
for i in range(1,n+1):
for j in range(0, n+1-i):
k = n - i- j
if 10*i + 5*j + k == y:
print('i j k')
break
print('-1 -1 -1') |
s107685954 | p03471 | u836737505 | 1574224102 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 225 | N,Y = map(int, input().split())
c = [-1,-1,-1]
for i in range(N+1):
for j in range(N+1):
if N-i-k >= 0 and 10000*i + 5000*j + 1000*(N-i-k) == Y:
c = [i,j,N-i-k]
break
print(c[0],c[1],c[2]) |
s386250599 | p03471 | u836737505 | 1574223907 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 237 | N, Y = map(int, input().split())
c = [-1,-1,-1]
for i in range(N+1):
for j in range(N+1):
if N-i-k >=0 and 10000*i + 5000*j + 1000*(N-i-k) == Y:
c = [i,j,N-i-k]
break
print(c[0],c[1],c[2]) |
s577771717 | p03471 | u836737505 | 1574223696 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 214 | N, Y = map(int, input().split())
c = [-1,-1,-1]
for i in range(N+1):
for j in range(N+1):
if N-i-k >=0 and 10000*i + 5000*j + 1000*(N-i-k) == Y:
c = [i,j,N-i-k]
print(c[0],c[1],c[2]) |
s698474751 | p03471 | u836737505 | 1574223526 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 200 | N, Y = map(int, input().split())
c = [-1,-1,-1]
for i in range(N+1):
for j in range(N+1):
if 10000*i + 5000*j + 1000*(N-i-k) == Y:
c = [i,j,N-i-k]
print(c[0],c[1],c[2]) |
s097723645 | p03471 | u836737505 | 1574223234 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 202 | N, Y = map(int, input().split())
c = [-1,-1,-1]
for i in range(N+1):
for j in range(N-i+1):
if 10000*i + 5000*j + 1000*(N-i-k) == Y:
c = [i,j,N-i-k]
print(c[0],c[1],c[2]) |
s499397595 | p03471 | u760794812 | 1574077361 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 327 | N,Y = map(int,input().split())
y = Y/1000
Answer = [-1, -1, -1]
for i in range(N+1):
if i*10 <= y:
for j in range(N-i):
if i*10 + j*5 <= y:
k = y - i*10 - j*5:
if i + j + k == N:
Answer = [i,j,k]
else:
break
else:
break
print(Answer[0],Answer[1],int(Answ... |
s471109570 | p03471 | u780962115 | 1574050597 | Python | Python (3.4.3) | py | Runtime Error | 1306 | 3064 | 302 | #お年玉
n,y=map(int,input().split())
a,b,c=0,0,0
for i in range(2001):
for j in range(2001):
if i+j<=n and 10000*i+5000*j+1000*(n-i-j)==y:
a=i
b=j
c=n-i-j
flag=True
break
if flag:
print(a,b,c)
if not flag:
print(-1,-1,-1) |
s712120734 | p03471 | u123745130 | 1573882123 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 254 | n,y=map(int,input().split())
a=10000
b=5000
c=1000
sum_money=y
for i in range(0,n+1):
for j in range(0,n+1-i):
k=n-i-j and k>=0
if sum_money==a*i+b*j+c*k:
print(i,j,k)
break
else:
continue
break
else:
print("-1","-1","-1")
|
s964793214 | p03471 | u028260664 | 1573882069 | Python | Python (3.4.3) | py | Runtime Error | 24 | 3064 | 367 | def get_pattern(n, y):
X = 10
Y = 5
Z = 1
y //= 1000
for nx in range(n+1):
m = n - nx
for ny in range(m+1):
nz = m - ny
sum = nx * X + ny * Y + nz * Z
if y == sum:
return f'{nx} {ny} {nz}'
return '-1 -1 -1'
n, y = [int(x) for... |
s883533337 | p03471 | u028260664 | 1573881960 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 368 | def get_pattern(n, y):
X = 10
Y = 5
Z = 1
y //= 1000
for nx in range(n+1):
m = n - nx
for ny in range(m+1):
nz = m - ny
sum = nx * X + ny * Y + nz * Z
if y == sum:
return f'{nx} {ny} {nz}'
return '-1 -1 -1'
n, y = [int(x) for... |
s827154148 | p03471 | u457423258 | 1573102654 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 186 |
N,Y=map(int,input().split())
for i in range(N+1):
for j in range(N+1-j):
if i*10000+j*5000+(N-i-j)*1000==Y:
print(i,j,N-i-j)
exit()
print(-1,-1,-1)
|
s778210375 | p03471 | u923659712 | 1573027354 | Python | Python (3.4.3) | py | Runtime Error | 721 | 3060 | 216 | n,x=map(int,input().split())
for i in range(n+1):
for j in range(n-i+1):
if x==10000*i+5000*j+1000*(n-i-j):
h=[i,j,n-i-j]
a=h.replace(","," ")
print(a)
exit()
print("-1 -1 -1") |
s026130845 | p03471 | u279292103 | 1572702041 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 186 | n, y = map(int, input().split())
for i in range(n):
for j in range(n-i):
if 10000*i+5000*j+1000*(n-i-j) == y:
print(i,j,n-i-j)
break()
print(-1,-1,-1) |
s335256171 | p03471 | u887524368 | 1572551834 | Python | Python (3.4.3) | py | Runtime Error | 452 | 73116 | 405 | def judge(z):
if z >= 0:
remain = n - z
pay = [[i, remain - i] for i in range(remain + 1)]
for i in range(remain + 1):
if 10 * pay[i][0] + 5 * pay[i][1] + z == m:
print(pay[i][0], pay[i][1], z)
exit()
judge(z - 1)
else:
print... |
s768857562 | p03471 | u887524368 | 1572542657 | Python | Python (3.4.3) | py | Runtime Error | 76 | 3956 | 460 | def abc_list(c: int):
a = -n + m / 5 + 4 * c / 5
b = 2 * n + -m / 5 - 9 * c / 5
if a >= 0 and b >= 0:
return [int(a), int(b), c]
else:
return False
def judge(z):
if z <= n:
l = abc_list(z)
if l == False or sum(l) != n:
judge(z + 1)
else:
... |
s891917549 | p03471 | u225577738 | 1571974282 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 486 | import sys
stdin = sys.stdin
na = lambda: list(map(int, ns().split()))
ns = lambda: stdin.readline()
N, Y = na()
ans="-1 -1 -1"
for i in range(N+1, -1, -1):
if (i * 10000) > Y:
continue
for j in range(N+1-i):
k = n - i - j
if ((i * 10000) + (j * 5000)) > Y:
continue
... |
s686007066 | p03471 | u636822224 | 1571869466 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 166 | n,y = int(input())
for a in range(n+1):
for b in range(n+1-b):
if a*10000+b*5000+(n-a-b)*1000==n:
print str(a)+" "+str(b)+" "+ str(n-a-b)
print "-1 -1 -1" |
s126435874 | p03471 | u196404530 | 1571784979 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 270 | a,b = map(int,input().split())
x = -1
y = -1
z = -1
for ai in range(ai):
for aii in range(ai):
for aiii in range(ai):
if a == ai+1+aii+1+aiii+1 and 1000*ai+5000*aii+10000*aiii:
x = ai+1
y = aii+1
z = aiii+1
break
print(x,y,z)
|
s789250525 | p03471 | u896741788 | 1571628649 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 171 | mai,yen=map(int,input().split())
for i in range(mai+1):
for j in range(mai+1-j):
if 10000*i+5000*j+1000*(mai-i-j)==yen:print(i,j,mai-i-j);exit()
else:print(-1,-1,-1) |
s432811716 | p03471 | u896741788 | 1571628625 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 170 | mai,yen=map(int,input().split())
for i in range(mai+1):
for j in range(mai+1-j):
if 10000*i+5000*j+1000*(mai-i-j)==yen:print(i,j,mai-i-j);exit()
else:pint(-1,-1,-1) |
s799743183 | p03471 | u291628833 | 1571439006 | Python | PyPy3 (2.4.0) | py | Runtime Error | 169 | 38256 | 133 | for i in range(n+1):
for j in range(n-i+1):
if 10000*i+5000*j+1000*(n-i-j)==y:
print(i,j,n-i-j);exit()
print(-1,-1,-1)
|
s801822654 | p03471 | u291628833 | 1571437949 | Python | PyPy3 (2.4.0) | py | Runtime Error | 238 | 41068 | 320 | n,y = map(int,input().split())
for m in range(0,n):
for g in range(0,n):
s = n-m-g
if s < 0:
s = 0
yen = 10000*m + 5000*g + s*1000
if int(yen) == int(y):
print("{0} {1} {2}".format(m,g,s))
sys.exit()
print("-1 -1 -1")
|
s845404249 | p03471 | u895231258 | 1571323737 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 940 | def abc_exp(a,b,c):
print(str(a) + ' ' + str(b) + ' ' + str(c) )
def exchange(a,b,remain):
if remain > int(a * 2):
b = b + int( a / 4) * 8
a = a % 4
return a,b
while True:
N,Y = map(int,input().split())
a = int(Y/10000)
b = int((Y - a * 10000)/5000)
c = int((Y - a * 10000 - b * 5000)/1000)
max_bill... |
s730452392 | p03471 | u080108339 | 1570933899 | Python | Python (3.4.3) | py | Runtime Error | 34 | 3064 | 396 | N, Y = map(int, input().split())
x=-1
y=-1
z=-1
Ten=10000
Five=5000
One=1000
count=0
max_x=int(Y//Ten)
if max_x <= N:
for i in reversed(range(0,max_x+1)):
if count ==0:
max_y = int((Y - Ten*i)//Five)
if (max_y + i) <= N:
for j in reversed(range(0, max_y+1)):
if (Ten*j + Five*i + One*(N-i-j))==Y:
... |
s603635328 | p03471 | u891518152 | 1570740244 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 394 | N, Y = map(int, input().split())
x = False
Y = Y//1000
for i in range(N+1):
for j in range(N-i+1):
b = N - i
c = N - i - j
if a + b + c == N and Y == a*10 + b*5 +c:
x = True
break
break
if x:
print(a, b, c , sep=... |
s349441063 | p03471 | u033606236 | 1570125924 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 222 | n,y = map(int,input().split())
a,b,c = 10000,5000,1000
for i in range(y//a+1):
total = 0
for j in range((y-(a*i))//b+1):
d = (y-(a*i)-(b*j))//c
if i+j+d == n:print(i,j,d);exit()
eles:print(-1,-1,-1) |
s365415590 | p03471 | u527261492 | 1569980042 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 192 | import sys
n,y=map(int,input().split())
for i in range(n+1):
for j in range(n-i+1):
if i*10000+j*5000+(n-i-j)*1000==y:
print(i j n-i-j)
sys.exit()
print(-1 -1 -1)
|
s244055792 | p03471 | u527261492 | 1569979928 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 211 | import sys
n,y=map(int,input().split())
for i in range(n+1):
for j in range(n-i+1):
for k in range(n-i-j+1):
if i*10000+j*5000+k*1000==y:
print(i j k)
sys.exit()
print(-1 -1 -1)
|
s250324297 | p03471 | u527261492 | 1569979876 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 210 | import sys
n,y=map(int,input().split())
for i in range(n+1):
for j in range(n-j+1):
for k in range(n-i-j+1):
if i*10000+j*5000+k*1000==y:
print(i j k)
sys.exit()
print(-1 -1 -1)
|
s359863014 | p03471 | u687159441 | 1569632401 | Python | Python (3.4.3) | py | Runtime Error | 1727 | 3060 | 313 | n, y = map(int, input().split())
k = 0
result = 0
for i in range(n + 1):
for j in range(n + 1):
k = n - i - j
ans = 10000 * i + 5000 * j + 1000 * k
if (ans == y):
print(a, b, c)
result += 1
exit()
if result == 0:
print('-1 -1 -1')
|
s126664031 | p03471 | u687159441 | 1569632238 | Python | Python (3.4.3) | py | Runtime Error | 710 | 3064 | 340 | N,Y = map(int,input().split())
for x in range(N+1):
for y in range(N-x+1):
if 10000*x+5000*y+1000*(N-x-y) == Y:
print(x,y,N-x-y)
exit()
print(-1,-1,-1)
N,Y = map(int,input().split())
for x in range(N+1):
for y in range(N-x+1):
if 10000*x+5000*y+1000*(N-x-y) == Y:
print(x,y,N-x-y)
exi... |
s935575055 | p03471 | u687159441 | 1569632162 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 197 | n, y = map(int, input())
k = 0
for i in range(n+1):
for j in range(n+1):
k = n - (i + j)
z = 10000*i + 5000*j + 1000*k
if z == y:
print(i, j, k)
exit()
print(-1, -1, -1) |
s157052936 | p03471 | u341926204 | 1569601906 | Python | PyPy3 (2.4.0) | py | Runtime Error | 173 | 38256 | 34 | https://shirahonoyu.com/#character |
s632332015 | p03471 | u256031597 | 1569290899 | Python | Python (3.4.3) | py | Runtime Error | 432 | 3064 | 337 | N, Y = map(int, input().split())
Y //= 1000
xmax = Y//10
flag = True
for x in range(xmax, -1, -1):
if flag==False:
break
for y in range(N-x, -1, -1):
if 9*x + 6*y == Y - N:
xans = x
yans = y
zans = N - x - y
flag = False
break
print(... |
s318576179 | p03471 | u156113867 | 1568780167 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 193 | N, Y = map(int, input().split())
for s in N+1:
for g in (N-s):
i = N - s - g
if 1000*s + 5000*g + i*10000 == Y:
print(s, g, i, sep=" ")
exit()
print(-1, -1, -1, sep=" ")
|
s833264489 | p03471 | u156113867 | 1568780128 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 218 | N, Y = map(int, input().split())
# Nマイ,Y縁
s, g, i
for s in N+1:
for g in (N-s):
i = N - s - g
if 1000*s + 5000*g + i*10000 == Y:
print(s, g, i, sep=" ")
exit()
print(-1, -1, -1, sep=" ")
|
s897754899 | p03471 | u539517139 | 1568496804 | Python | Python (3.4.3) | py | Runtime Error | 693 | 3060 | 191 | n,y=map(int,input().split())
x=[-1,-1,-1]
for i in range(n+1):
for j in range(n-i+1):
if 10000*i+5000*j+1000*(n-i-j)==y:
x=[i,j,n-i-j]
break
for _ in range(3):
print(x[i]) |
s941297817 | p03471 | u092244748 | 1568475352 | Python | Python (3.4.3) | py | Runtime Error | 750 | 2940 | 301 | # 自分の回答
n, y = map(int, input().split())
flag = False
for i in range(n + 1):
for j in range(n - i + 1):
if(10000 * i + 5000 * j + 1000 * (n - i - j) == y):
print(i, j, k)
flag = True
exit()
if not flag:
print("-1 -1 -1")
|
s054244511 | p03471 | u092244748 | 1568474662 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 373 | # 自分の回答
n, y = map(int, input().split())
flag = False
for i in range(n):
for j in r6ange(n-i):
for k in range(n-i-j):
if(10000 * i + 5000 * j + 1000 * k == y):
print(i, j, k)
flag = True
break
if flag:
break
if flag:
... |
s872688201 | p03471 | u183840468 | 1568323297 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 444 | n,m = [int(i) for i in input().split()]
l = sorted([[int(i) for i in input().split()] for _ in range(n)],key = lambda x: (x[1]))
l2 = sorted(l,key = lambda x :x[0])
min_atk = l2[n-1][0]
ct = 0
for i in range(len(l)-1,0,-1):
if l[i][1] >= min_atk and m >= 0:
m -= l[i][1]
ct += 1
else:
br... |
s502583330 | p03471 | u732870425 | 1568241502 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 253 | N, Y = map(int, input())
flag = False
for x in range(N+1):
for y in range(N+1):
z = N - (x + y)
if Y == 10000 * x + 5000 * y + 1000 * z:
flag = True
print(x, y, z)
break
if flag:
break |
s212739827 | p03471 | u732870425 | 1568241401 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 240 | N, Y = map(int, input())
for x in range(N+1):
for y in range(N+1):
z = N - (x + y)
if Y == 10000 * x + 5000 * y + 1000 * z:
flag = True
print(x, y, z)
break
if flag:
break |
s263545155 | p03471 | u572142121 | 1568223582 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 193 | N,Y=map(int,input().split())
for x in range(N+1):
for y in range(N+1-x):
z=N-x-y
if 10000*x+5000*y+1000*z == Y and 2000=>z=>0:
print((x,y,z))
exit()
print(-1,-1,-1) |
s106368496 | p03471 | u785578220 | 1567823302 | Python | PyPy3 (2.4.0) | py | Runtime Error | 174 | 38256 | 238 | import math
n = int(input())
l = []
M= 0
for i in range(n):
x,y = map(int,input().split())
l.append((x,y))
for i ,(x1,y1) in enumerate(l):
for x2,y2 in l[i+1:n]:
M = max(M,math.sqrt((x1-x2)**2+(y1-y2)**2))
print(M)
|
s523634143 | p03471 | u558961961 | 1567657819 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 251 | import math
N, Y = list(map(int, input().split()))
z = Y//1000 - N
for m in range(z//9 + 1):
if (z - 9*m)%4 == 0:
g = (z - 9*m)//4
result = [m, g, N-m-g]
else:
result = [-1, -1, -1]
print(' '.join(map(str, result))) |
s336019443 | p03471 | u601321817 | 1567652773 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 458 | ny = input()
n, y = [int(x) for x in ny.split(" ")]
min_y_1000 = y % 5000
min_n_1000 = math.floor(min_y_1000 / 1000)
match = [-1,-1,-1]
if y % 1000 == 0:
for n_1000 in range(min_n_1000,max_n_1000 + 1, 5):
y_2 = y - 1000 * n_1000
n_2 = n - n_1000
n_10000_n_5000_comb = calc_10000_5000_comb(n_2... |
s183265371 | p03471 | u733738237 | 1567635280 | Python | PyPy2 (5.6.0) | py | Runtime Error | 36 | 28012 | 224 | n,y=map(int,input().split())
A,B,C=[-1,-1,-1]
f=True
for a in range(n+1):
for b in range(n+1):
if 10000*a+5000*b+1000*(n-a-b)==y and 0<=n-a-b<=n:
A,B,C=[a,b,n-a-b]
f=False
break
if f==False:
break
print(A,B,C) |
s193018844 | p03471 | u868600519 | 1567604247 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 312 | N, Y = map(int, input().split())
if N * 10000 >= Y:
for a in range(Y // 10000 + 1):
if a * 10000 + (N - a) * 5000 >= Y:
for b in range((Y - a * 10000) // 5000 + 1):
c = (Y - a * 10000 - b * 5000) // 1000
if a + b + c == N:
print(a, b, c)
return
print(-1, -1, -1)
|
s172785292 | p03471 | u977349332 | 1567445044 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 406 | #include <bits/stdc++.h>
using namespace std;
int main()
{
int N, Y;
cin >> N >> Y;
for(int x = 0; x <= N; x++){
for(int y = 0; y <= N - x; y++){
int z = N - x - y;
if((10000*x + 5000*y + 1000*z) == sum)
cout << x << ' ' << y << ' ' << z << endl;
... |
s745539175 | p03471 | u977349332 | 1567444926 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 448 | #include <bits/stdc++.h>
using namespace std;
int main()
{
int N, Y;
cin >> n >> sum;
int res;
for(int x = 0; x <= n; x++){
for(int y = 0; y <= n - x; y++){
int z = n - x - y;
res = 10000 * x + 5000 * y + 1000 * z;
if(res == sum)
cout << x <<... |
s144825052 | p03471 | u981931040 | 1567181192 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3064 | 683 | N , Y = map(int , input().split())
for y in range(N + 1):
z = - N / 9 + Y / 9000 - 4 * y / 9
tmp_z = z - int(z)
if int(str(tmp_z)[2]) != 0:
continue
else:
z = int(z)
x = 5 * N / 4 - Y / 4000 + 5 * z / 4
tmp_x = x - int(x)
if int(str(tmp_x)[2]) != 0:
continue
else:... |
s123979072 | p03471 | u483304397 | 1566523111 | Python | Python (3.4.3) | py | Runtime Error | 19 | 2940 | 385 | N,Y = map(int,input().split())
count=0
for x in range(N+1):
for y in range(N+1):
if x+y >N:
break
else:
money = 10000*x + 5000*y + 1000*(N-x-y)
if money == Y:
count=1
print('{} {} {}'.format(x,y,N-x-y)
break
else... |
s936302222 | p03471 | u483304397 | 1566522802 | Python | Python (3.4.3) | py | Runtime Error | 19 | 2940 | 376 | N,Y = map(int,input().split())
count=0
for x in range(N+1):
for y in range(N+1):
if x+y >N:
break
else:
money = 10000*x + 5000*y + 1000*(N-x-y)
if money == Y:
count=1
print(f'{x} {y} {N-x-y}')
break
else:
... |
s629760243 | p03471 | u273038590 | 1566229109 | Python | PyPy3 (2.4.0) | py | Runtime Error | 165 | 38384 | 199 | N, Y =map(int,input().split(" "))
for i in range(N+1):
for j in range(N-i+1):
if i * 10000 + j*5000 + (N-i-j)*1000 ==y:
print(i, j, N-i-j)
exit()
print(-1, -1, -1) |
s451100868 | p03471 | u273038590 | 1566228990 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 199 | N, Y =map(int,input().split(" "))
for i in range(N+1):
for j in range(N-i+1):
if i * 10000 + j*5000 + (N-i-j)*1000 ==y:
print(i, j, N-i-j)
exit()
print(-1, -1, -1) |
s334436299 | p03471 | u024768467 | 1566080528 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 195 | n,y = map(int,input().split())
for a in range(n+1):
for b in range(n-b+1):
c=n-a-b
if 10000*a+5000*b+1000*c==y:
print(a, b, c)
exit()
print("-1 -1 -1") |
s867203445 | p03471 | u340153434 | 1566071618 | Python | Python (3.4.3) | py | Runtime Error | 657 | 3060 | 375 | N,Y = map(int,input().split())
x = y = z = 0
for i in range(N,-1,-1):
if i*10000 <= Y:
charge = Y - i*10000
rest = N - i
for j in range(rest,-1,-1):
if j*5000 <= charge:
if charge - j*5000 - (rest-j)*1000 == 0:
print('{1} {2} {3}'.format(i, j ,... |
s804253542 | p03471 | u340153434 | 1566071245 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 359 | N,Y = map(int,input().split())
x = y = z = 0
for i in range(N,-1,-1):
if i*10000 <= Y:
charge = Y - i*10000
rest = N - i
for j in range(rest,-1,-1):
if j*5000 <= charge:
if charge - j*5000 - (rest-j)*1000 == 0:
print(f'{i} {j} {rest-j}')
... |
s791360321 | p03471 | u340153434 | 1566071180 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 360 | N,Y = map(int,input().split())
x = y = z = 0
for i in range(N,-1,-1):
if i*10000 <= Y:
charge = Y - i*10000
rest = N - i
for j in range(rest,-1,-1):
if j*5000 <= charge:
if charge - j*5000 - (rest-j)*1000 == 0:
print(f'{i} {j} {rest-j}')
... |
s180053263 | p03471 | u340153434 | 1566069625 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 362 | N,Y = map(int,input().split())
x = y = z = 0
for i in range(N,-1,-1):
if i*10000 <= Y:
charge = Y - i*10000
rest = N - i
for j in range(rest,-1,-1):
if j*5000 <= charge:
if charge - j*50000 - (rest-j)*1000 == 0:
print(f'{i} {j} {rest-j}')
... |
s899142482 | p03471 | u340153434 | 1566069593 | Python | PyPy3 (2.4.0) | py | Runtime Error | 178 | 38256 | 362 | N,Y = map(int,input().split())
x = y = z = 0
for i in range(N,-1,-1):
if i*10000 <= Y:
charge = Y - i*10000
rest = N - i
for j in range(rest,-1,-1):
if j*5000 <= charge:
if charge - j*50000 - (rest-j)*1000 == 0:
print(f'{i} {j} {rest-j}')
... |
s952829386 | p03471 | u340153434 | 1566069498 | Python | PyPy3 (2.4.0) | py | Runtime Error | 183 | 38256 | 343 | N,Y = map(int,input().split())
x = y = z = 0
for i in range(N,-1,-1):
if i*10000 <= Y:
charge = Y - i*10000
rest = N - i
for j in range(rest,-1,-1):
if j*5000 <= charge:
if charge - j*50000 - (rest-j)*1000 == 0:
print(f'{i} {j} {rest-j}')
... |
s959510858 | p03471 | u437632122 | 1566028059 | Python | PyPy3 (2.4.0) | py | Runtime Error | 172 | 38384 | 514 | N, Y = map(int, input().split())
ans = 0
found = False
for i in range(N + 1):
for j in range(0, N - i + 1):
k = N - i - j
is_sum = i * 10_000 + j * 5_000 + k * 1_000 == Y
if is_sum:
print(i, j, k)
found = True
break
if found:
break
# fo... |
s593152448 | p03471 | u437632122 | 1566027642 | Python | PyPy3 (2.4.0) | py | Runtime Error | 168 | 38256 | 499 | N, Y = map(int, input().split())
ans = 0
found = False
for i in range(N):
for j in range(N):
k = N - i - j
is_sum = i * 10_000 + j * 5_000 + k * 1_000 == Y
if is_sum:
print(i, j, k)
found = True
break
if found:
break
# for k in range(N)... |
s371870868 | p03471 | u510565553 | 1565823580 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 397 | i = input()
i = i.split(" ")
n = int(i[0])
y = int(i[1])
y = y / 1000
for c in range(int(((y-n) // 9))+1):
if (int((y-n-9*c)) % 4) == 0:
cn = [int((y-n-9*c) / 4), c]
break
else:
pass
if(len(cn) == 0):
rs = [-1, -1, -1]
else:
a = n - cn[0] - cn[1]
if a >= 0:
rs = [a, cn[0], cn[1]]
else:
... |
s038462757 | p03471 | u510565553 | 1565823332 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3188 | 397 | i = input()
i = i.split(" ")
n = int(i[0])
y = int(i[1])
y = y / 1000
for c in range(int(((y-n) // 9))+1):
if (int((y-n-9*c)) % 4) == 0:
cn = [int((y-n-9*c) / 4), c]
break
else:
pass
if(len(cn) == 0):
rs = [-1, -1, -1]
else:
a = n - cn[0] - cn[1]
if a >= 0:
rs = [a, cn[0], cn[1]]
else:
... |
s875863144 | p03471 | u401077816 | 1565661070 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 240 | N, Y = map(int, input().split())
res = (-1, -1, -1)
for x in range(N + 1):
for y in range(N + 1 - x):
if N - x - y >=0 and 10000*x + 5000*y + 1000*(N - x -y) == Y:
res = (x, y, N - x - y)
print(res[0], res[1], res[2])
|
s656387050 | p03471 | u889344512 | 1565658693 | Python | PyPy3 (2.4.0) | py | Runtime Error | 220 | 41324 | 412 | n, y = map(int,input().split())
ans = [-1,-1,-1]
for i in range(n,-1,-1):
if i*10000 > y:
continue
else:
yt = y-i*10000
nt = n-i
for j in range(min(yt//5000+1,nt+1)):
yn = yt - j*5000
nn = nt - j
if nn*1000 == yn:
ans = [i,j,nn... |
s504374996 | p03471 | u412255932 | 1565619664 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3060 | 271 | N, Y = map(int, input().aplit())
boolean = False
for i in range(N+1):
for j in range(N+1-i):
if (Y - 10000 * i + 5000 * j) // 1000 == (N - i - j):
boolean = True
break
if boolean:
print(i, j, N - i - j)
else:
print(-1, -1, -1) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.