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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s126068792 | p03471 | u755180064 | 1585459496 | Python | Python (3.4.3) | py | Runtime Error | 2108 | 3316 | 383 | if __name__ == '__main__':
t = (input().split(' '))
t = [int(v) for v in t]
for i in range(t[0]):
for j in range(t[0] - i):
for k in range(t[0] - j):
if (10000 * i) + (5000 * j) + (k * 1000) == t[1]:
if i + j + k == t[0]:
print(... |
s251865198 | p03471 | u886655280 | 1585433673 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 888 | # https://atcoder.jp/contests/abc085/tasks/abc085_c
# N枚、Y円
N, Y = map(int, input().split())
for i in range(N):
for j in range(N):
z = N - (i + j)
if z < 0:
continue
if i*1000 + j*5000 + z*10000 == Y:
print(i, j... |
s111366681 | p03471 | u545269693 | 1585410315 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 205 | n,y=map(int,input().split())
for i in range(n + 1):
for f 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") |
s594772241 | p03471 | u291914812 | 1585331188 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 188 | N, Y = map(int, input().split())
for i in (N+1):
for j in (N+1):
k = N-i-j
if (Y == 10000*i + 5000*j + 1000*k and K > 0 ):
print(i, j, f)
else:
print(-1, -1, -1) |
s523325352 | p03471 | u471539833 | 1585321515 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 263 | N,Y=map(int,input().split())
flag=False
for i in range(N+1):
for j in range(N+1):
if(9000*i+4000*j==Y-1000*N):
flag=True
x=i
y=j
z=N-i-j
if(flag=True and z>=0):
print(str(x)+" "+str(y)+" "+str(z))
else:
print("-1 -1 -1") |
s148519991 | p03471 | u549383771 | 1585275178 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 302 | N,Y = map(int,input().split())
flag = False
for i in range(N+1):
for j in range(N+1-i):
x = N - i - jint
if x*1000 + j*5000 +i*10000 == Y:
print(i,j,x)
flag = True
break
if flag == True:
break
if flag == False:
print('-1 -1 -1') |
s936354276 | p03471 | u851706118 | 1585151864 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3060 | 263 | n, y = map(int, input().split())
a = -1
b = -1
c = -1
for i in range(n+1):
for j in range(n+1-i):
k = (n - i - j)
if 10000 * i + 5000 * j + 1000 * k == y:
a = i, b = j, c = k
print(i, j, k)
break
print(a, b, c) |
s799730222 | p03471 | u260036763 | 1584993643 | Python | Python (3.4.3) | py | Runtime Error | 1435 | 3064 | 330 | N, Y = map(int, input().split())
flag = True
for x in range(N+1):
for y in range(N+1):
z = N-x-y
if 10000*x + 5000*y + 1000*z == Y:
print(str(x) + ' ' + str(y) + ' ' + str(z))
flag = False
break
if not flag:
break
if baloon:
print('... |
s753431138 | p03471 | u957198490 | 1584846046 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 3064 | 308 | N,Y = map(int,input().split())
ans = '-1 -1 -1'
for i in range(2001):
for j in range(2001):
for k in range(2001):
if 10000*i + 5000*j + 1000*k == Y and i+j+k == N:
ans = str(i) + ' '+str(j) + ' '+ str(k)
print(ans)
sys.exit()
print(ans) |
s000806496 | p03471 | u444722572 | 1584833937 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 184 | 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") |
s940206141 | p03471 | u891847179 | 1584819637 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 354 | N, Y = list(map(int, input().split()))
final_ans = None
for i in range(N + 1):
for j in range(N + 1):
# print(i, j, N - i - j)
ans = i * 10000 + j * 5000 + (N - i - j) * 1000
if ans == Y:
final_ans = f"{i} {j} {N - i - j} "
break
if final_ans is None:
print('-1 -... |
s810055566 | p03471 | u891847179 | 1584819137 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 352 | N, Y = list(map(int, input().split()))
final_ans = None
for i in range(N + 1):
for j in range(N + 1):
# print(i, j, N - i - j)
ans = i * 10000 + j * 5000 + (N - i - j) * 1000
if ans == Y:
final_ans = f"{i} {j} {N - i - j}"
break
if final_ans is None:
print('-1 -1... |
s171176447 | p03471 | u891847179 | 1584818902 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 340 | N, Y = list(map(int, input().split()))
# Flag = False
final_ans = None
for i in range(N + 1):
for j in range(N + 1 - i):
ans = i * 10000 + j * 5000 + (N - i - j) * 1000
if ans == Y:
final_ans = f"{i} {j} {N - i - j}"
break
if final_ans is None:
print('-1 -1 -1')
else:
... |
s202337118 | p03471 | u089142196 | 1584756034 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 260 | N,Y=map(int,input().split())
flag=False
for i in range(0,N+1):
if flag==False:
for j in range(0,N-i+1):
P=10000*i+5000*j+1000*(N-i-j)
if Y==P:
print(i,j,N-i-j)
flag=True
break
if flag==False::
print(-1,-1,-1) |
s311323415 | p03471 | u089142196 | 1584755961 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 218 | N,Y=map(int,input().split())
flag=False
for i in range(0,N+1):
for j in range(0,N-i+1):
P=10000*i+5000*j+1000*(N-i-j)
if Y==P:
print(i,j,N-i-j)
flag=True
if flag==False::
print(-1,-1,-1) |
s771153159 | p03471 | u631429391 | 1584393085 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 294 | n,y = map(int,input().split())
lst = []
ans = 0
for i in range_(y//10000+1):
for j in range(y//5000+1):
k = (y - 10000*i - 5000*j)//1000
if k >= 0 and i+j+k == n:
lst.append([i,j,k])
ans += 1
if ans > 0:
print(*lst[0])
else:
print('-1 -1 -1') |
s330247533 | p03471 | u631429391 | 1584392821 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3064 | 391 | n,y = map(int,input().split())
lst = []
ans = 0
for man in range(0,y+1,10000):
for gosen in range(0,y+1,5000):
sen = y - man - gosen
if 0 <= sen <= y and man//10000 + gosen//5000 + sen//1000 ==n:
lst.append([man//10000,gosen//5000,sen//1000])
ans += 1
if a > 0:
... |
s355840905 | p03471 | u631429391 | 1584392743 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 337 | n,y = map(int,input().split())
lst = []
ans = 0
for man in range(0,y+1,10000):
for gosen in range(0,y+1,5000):
if 0 <= y - man - gosen <= y and man//10000 + gosen//5000 + sen//1000 ==n:
lst.append([man//10000,gosen//5000,sen//1000])
ans += 1
if ans == 0:
print('-1 -1 -1')
else:
... |
s324462249 | p03471 | u631429391 | 1584392704 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 373 | n,y = map(int,input().split())
lst = []
ans = 0
for man in range(0,y+1,10000):
for gosen in range(0,y+1,5000):
if 0 <= y - man - gosen <= y and man//10000 + gosen//5000 + sen//1000 ==n:
lst.append([man//10000,gosen//5000,sen//1000])
ans += 1
if a > 0:
break
if ans... |
s861022715 | p03471 | u631429391 | 1584392615 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 384 | n,y = map(int,input().split())
lst = []
ans = 0
for man in range(0,y+1,10000):
for gosen in range(0,y+1,5000):
if 0 <= y - man - gosen <= y and man//10000 + gosen//5000 + sen//1000 ==n:
lst.append([man//10000,gosen//5000,sen//1000])
ans += 1
if ans != 0:
b... |
s640431904 | p03471 | u631429391 | 1584392554 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 376 | n,y = map(int,input().split())
lst = []
ans = 0
for man in range(0,y+1,10000):
for gosen in range(0,y+1,5000):
if 0 <= y - man - gosen <= y and man//10000 + gosen//5000 + sen//1000 ==n:
lst.append([man//10000,gosen//5000,sen//1000])
ans += 1
if ans != 0:
break
if ... |
s673454217 | p03471 | u852210959 | 1584312158 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 461 | # -*- coding: utf-8 -*-
def main():
n, y = map(int, input().split())
a, b, c = -1, -1, -1
for ia in range(n + 1):
for ib in range(n - ia + 1):
ic = n - ia - ib
total = ia * 10000 + ib * 5000 + ic * 1000
if total == y and (ia + ib + ic) == n:
a =... |
s849835848 | p03471 | u852210959 | 1584312096 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 473 | # -*- coding: utf-8 -*-
import math
def main():
n, y = map(int, input().split())
a, b, c = -1, -1, -1
for ia in range(n + 1):
for ib in range(n - ia + 1):
ic = n - ia - ib
total = ia * 10000 + ib * 5000 + ic * 1000
if total == y and (ia + ib + ic) == n:
... |
s860931010 | p03471 | u199191577 | 1584232278 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 574 | bill_count, total_money = map(int, input().split())
def calc(total_money, bill_count):
x_high_bound = int(total_money / 10000) if int(total_money / 10000) < bill_count else bill_count
for x in range(x_high_bound + 1):
hoge = bill_count - x
if 10000 * x + 5000 * hoge < total_money: continue
if 10000 * x... |
s000016131 | p03471 | u199191577 | 1584231940 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 574 | bill_count, total_money = map(int, input().split())
def calc(total_money, bill_count):
x_high_bound = int(total_money / 10000) if int(total_money / 10000) < bill_count else bill_count
for x in range(x_high_bound + 1):
hoge = bill_count - x
if 10000 * x + 5000 * hoge < total_money: continue
if 10000 * x... |
s628732618 | p03471 | u249447366 | 1584219241 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 243 | n, y = map(int, input().split())
r = range(n+1)
ans = "-1 -1 -1"
for i in r:
for j in r:
k = (y-(10000*i+5000*j))//1000
if k >= 0 and 10000*i+5000*j+1000*k == y and i+j+k == n:
ans = f"{i} {j} {k}"
print(ans)
|
s504094588 | p03471 | u699944218 | 1584219011 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 230 | N, Y = int(input().split())
ans = [-1,-1,-1]
for x in range(N+1):
for y in range(N+1):
z = N - x - y
if 10000 * x + 5000 * y + 1000 * z == Y:
ans[0] = x
ans[1] = y
ans[2] = z
print(ans[0],ans[1],ans[2]) |
s157260937 | p03471 | u699944218 | 1584218970 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 213 | N, Y = int(input().split())
ans = [-1,-1,-1]
for x in range(N+1):
for y in range(N+1):
z = N - x - y
if 10000 * x + 5000 * y + 1000 * z == Y:
ans[0] = x
ans[1] = y
ans[2] = z
print(ans) |
s373462980 | p03471 | u699944218 | 1584218454 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 185 | N, Y = int(input().split())
if 10000*a + 5000*b +1000*c == Y for a in range(N + 1) for b in range(N + 1) for c in range(N + 1):
print('{}{}{}', a,b,c)
else:
print('{}{}{}',-1,-1,-1) |
s929396365 | p03471 | u249447366 | 1584218059 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 212 | n, y = map(int, input().split())
r = range(n+1)
ans = "-1 -1 -1"
for i in r:
for j in r:
k = (y-(10000*i+5000*j))//1000
if k >= 0 and i+j+k == n:
ans = f"{i} {j} {k}"
print(ans)
|
s745617562 | p03471 | u249447366 | 1584217877 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 212 | n, y = map(int, input().split())
r = range(n+1)
ans = "-1 -1 -1"
for i in r:
for j in r:
k = (y-(10000*i+5000*j))//1000
if k >= 0 and i+j+k <= n:
ans = f"{i} {j} {k}"
print(ans)
|
s215968093 | p03471 | u706159977 | 1584133754 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 3064 | 335 | n,y = map(int,input().split())
s=[-1,-1,-1]
if n*10000<y:
pass
elif n*10000==y:
s=[n,0,0]
else:
m=1
x=n*10000
while m<=n:
for i in range(m+1):
x= x-9000*(m-i)-4000*i
if x == y:
s=[n-m,i,m-i]
break
if x==y:
break
... |
s518570185 | p03471 | u706159977 | 1584133379 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 3064 | 309 | n,y = map(int,input().split())
s=[-1,-1,-1]
if n*10000<y:
pass
else:
m=0
x=n*10000
while m<=n:
for i in range(m):
x= x-9000*(m-i)-4000*i
if x == y:
s=[n-m,i,m-i]
break
if x==y:
break
print(*l)
|
s434543748 | p03471 | u429541300 | 1583956702 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 230 | print(ans)
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")
|
s667756536 | p03471 | u247680229 | 1583889629 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 289 | import sys
N,Y=list(map(int, input().split()))
for j in range(N+1):
for k in range(N+1):
if N-j-k<0:
continue
Total=10**4*(N-j-k)+5000*j+10**3*k
if Total==Y:
print("{} {} {}".format(N-j-k,j,k))
sys.exit()
print("-1 -1 -1") |
s674264245 | p03471 | u217547685 | 1583786427 | Python | PyPy3 (2.4.0) | py | Runtime Error | 200 | 40684 | 240 | n, yen = map(int, input().split())
for x in range(n + 1):
for y in range(n - x + 1):
z = n - x - y
if yen == x * 10000 + y * 5000 + z * 1000:
print(x + " " + y + " " + z)
exit(0)
print("-1 -1 -1") |
s004783968 | p03471 | u131411061 | 1583623508 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 480 | def main():
N,Y = list(map(int,input().split()))
flag = False
for i in range(N+1):
for j in range(N+1):
for k in range(N+1):
if(i+j+k == N and 10000 * i + 5000 * j + 1000 * k == Y):
print(i,j,k)
flag = True
bre... |
s485805133 | p03471 | u541318412 | 1583419353 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 10584 | 398 | from functools import lru_cache
import sys
n,y = map(int,input().split())
sys.setrecursionlimit(n**2 +1)
@lru_cache(maxsize = n +1)
def depth(a,b):
if a+b <= n:
if (y-10000*a-5000*b)/1000 == n-a-b:
print(a,b,n-a-b)
exit()
else:
depth(a+1,b)
depth(a,b... |
s968379649 | p03471 | u030278108 | 1583025499 | Python | Python (3.4.3) | py | Runtime Error | 717 | 3060 | 208 | 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") |
s823591728 | p03471 | u035445296 | 1582830188 | Python | Python (3.4.3) | py | Runtime Error | 804 | 3060 | 225 | n ,y = map(int, input().split())
res = -1,-1,-1
for i in range(n):
for j in range(n+1-i):
ans = 10000*i + 5000*j +1000*(n-i-j)
if ans == y :
x,y,z = i , j, n-i-j
break
print('{0} {1} {2}'.format(x,y,z)) |
s355014351 | p03471 | u543779614 | 1582687745 | Python | PyPy3 (2.4.0) | py | Runtime Error | 172 | 38256 | 332 | from sys import stdin
import sys
def solves():
n, y = list(map(int,input().split()))
for i in range(n+1):
for j in range(1,n+1):
if 10000*i + 5000*j + 1000*(n-i-j) == y:
print(i, j, n-i-j)
return
print(-1,-1,-1)
if __name__ == "__main__":
... |
s816177622 | p03471 | u543779614 | 1582687369 | Python | PyPy3 (2.4.0) | py | Runtime Error | 170 | 38384 | 251 | from sys import stdin
import sys
n, y = list(map(int,input().split()))
for i in range(n+1):
for j in range(1,n+1)
if 10000*i + 5000*j + 1000*(n-i-j) == y:
print(i, j, n-i-j)
sys.exit()
print(-1,-1,-1) |
s505025923 | p03471 | u789565565 | 1582479958 | Python | Python (3.4.3) | py | Runtime Error | 678 | 3064 | 365 | N,Y = map(int,input().split())
if N*10000 == Y:
print(N,0,0)
else:
for a in range(N):
for b in range (N+1-a):
if a*10000+b*5000+1000*(N-a-b) == Y:
print(a,b,N-a-b)
break
if a*10000+b*5000+1000*(N-a-b) == Y:
break
if a == N-1 and b == 1 an... |
s001056843 | p03471 | u789565565 | 1582479821 | Python | Python (3.4.3) | py | Runtime Error | 681 | 3064 | 361 | N,Y = map(int,input().split())
if N*10000 == Y:
print(N,0,0)
else:
for a in range(N):
for b in range (N-a):
if a*10000+b*5000+1000*(N-a-b) == Y:
print(a,b,N-a-b)
break
if a*10000+b*5000+1000*(N-a-b) == Y:
break
if a == N-1 and b == 1 and ... |
s560529980 | p03471 | u789565565 | 1582479664 | Python | Python (3.4.3) | py | Runtime Error | 681 | 3064 | 363 | N,Y = map(int,input().split())
if N*10000 == Y:
print(N,0,0)
else:
for a in range(N):
for b in range (N+1-a):
if a*10000+b*5000+1000*(N-a-b) == Y:
print(a,b,N-a-b)
break
if a*10000+b*5000+1000*(N-a-b) == Y:
break
if a == N-1 and b == 1 an... |
s644314215 | p03471 | u974792613 | 1582159180 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 312 | n, y = map(int, input().split(" "))
found = False
for i in range(0, n + 1):
for j in range(0, n + 1 - i):
sum = 10000 * i + 5000 * j + 1000 * (n - i - j)
if sum == y:
found = True
print(str(i) + " " + str(j) + " " + str(n - i - j))
if !found:
print("-1 -1 -1")
|
s404422146 | p03471 | u156778434 | 1582158836 | Python | PyPy3 (2.4.0) | py | Runtime Error | 212 | 40812 | 235 | n, Y = map(int, input().split())
for x in range(n):
for y in range(n-x):
z = n-x-y
if (x*10000 + y*5000 + z*1000) == Y:
print(x, y, z)
a = 1
break
if a != 1:
print(-1, -1, -1) |
s137292698 | p03471 | u156778434 | 1582158681 | Python | PyPy3 (2.4.0) | py | Runtime Error | 195 | 40556 | 236 | n, Y = map(int, input().split())
for x in range(n):
for y in range(n-x):
z = n-x-y
if (x*10000 + y*5000 + z*1000) == Y:
print(x, y, z)
a = 1
exit()
if a != 1:
print(-1, -1, -1) |
s190944933 | p03471 | u709679133 | 1582003444 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 203 | N, Y = map(int, input().split())
for x in range(N+1):
for y in range(N+1-x):
if x*10000 + y*5000 + (N+1-x-y)*1000 == Y:
print(x, y, N+1-x-y)
else:
print(-1,-1,-1) |
s451057386 | p03471 | u709679133 | 1582003320 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 216 | N, Y = map(int, input().split())
for x in range(N+1):
for y in range(N+1-x):
for z in range(N+1-y):
if x*10000 + y*5000 + z*1000 == Y:
print(x, y, z)
else:
print(-1,-1,-1)
|
s957289139 | p03471 | u753955037 | 1581904698 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3316 | 450 | N_,Y_=input().split()
N=(int)(N_)
Y=(int)(Y_)
count = 0
a_ = Y//10000
if a_>N:
a_ = N
for a in range(a_+1):
Y_ = Y-a*10000
N_ = N-a
b_ = Y_//5000
if b_>N_ and b_>=0:
b_ = N_
for b in range(b_+1):
Y_ = Y_-b*5000
N_ = N_-b
if c_%1000:
c_ = Y_//1000
... |
s954359502 | p03471 | u595289165 | 1581832689 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 5068 | 478 | import sys
n, y = map(int, input().split())
sys.setrecursionlimit(2000)
def calc(a, b, c):
return 10000 * a + 5000 * b + 1000 * c
def dfs(pos, a, b, c):
if pos == n:
if calc(a, b, c) == y:
return [a, b, c]
else:
return [-1, -1, -1]
ret1 = [
dfs(pos+1, a+1,... |
s317910919 | p03471 | u849029577 | 1581752963 | Python | PyPy3 (2.4.0) | py | Runtime Error | 175 | 38896 | 199 | n, Y = map(int, input())
for x in range(2001):
for y in range(2001):
z = n-x-y
if (x*10000 + y*5000 + z*1000) == Y:
print(x, y, z)
exit()
print(-1, -1, -1) |
s075819042 | p03471 | u295043075 | 1581459196 | Python | Python (3.4.3) | py | Runtime Error | 1336 | 240748 | 419 | import numpy
n,y= map(int,input().split())
c=list(range(n+1))
lenC=len(c)
v1=numpy.repeat(c, lenC*lenC)
v2=numpy.repeat(lenC*c, lenC)
v3=numpy.repeat(lenC*lenC*c,1)
v = numpy.array([v1,v2,v3]).reshape(3,len(v1))
comb=v[:,sum(v)==n]
m=numpy.matrix([10000, 5000, 1000])
s = m*comb
if y in s:
ans=comb[:,numpy.array(s).... |
s317219194 | p03471 | u295043075 | 1581458827 | Python | Python (3.4.3) | py | Runtime Error | 1338 | 240620 | 418 | import numpy
n,y= map(int,input().split())
c=list(range(n+1))
lenC=len(c)
v1=numpy.repeat(c, lenC*lenC)
v2=numpy.repeat(lenC*c, lenC)
v3=numpy.repeat(lenC*lenC*c,1)
v = numpy.array([v1,v2,v3]).reshape(3,len(v1))
comb=v[:,sum(v)==n]
m=numpy.matrix([10000, 5000, 1000])
s = m*comb
if y in s:
ans=comb[:,numpy.array(s).... |
s061069522 | p03471 | u101442050 | 1581457817 | Python | PyPy3 (2.4.0) | py | Runtime Error | 168 | 38256 | 215 | import sys
n,y = map(int,input().split())
for i in range(n+1):
for j in range(n-i+1):
k = n-i-j:
if (10000*i+5000*j+1000*k == y):
print(i,j,k)
sys.exit()
print(-1,-1,-1)
|
s165205666 | p03471 | u101442050 | 1581457770 | Python | PyPy3 (2.4.0) | py | Runtime Error | 164 | 38256 | 199 | n,y = map(int,input().split())
for i in range(n+1):
for j in range(n-i+1):
k = n-i-j:
if (10000*i+5000*j+1000*k == y):
print(i,j,k)
exit()
print(-1,-1,-1) |
s341729992 | p03471 | u699522269 | 1581360064 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 330 | a,sums= list(map(int,input().split()))
print(a)
yuki = sums//10000
taishi = (sums%10000) //5000
noguchi = (sums%5000) //1000
while a<yuki+taishi+noguchi:
if a-(yuki+taishi+noguchi)%4==0:
taishi-=1
noguchi+=5
else:
yuki-=1
taishi+=2
if a==yuki+taishi+noguchi:
print(yuki,taishi,noguchi)
else print("... |
s232838951 | p03471 | u170319289 | 1581004983 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 4008 | 389 | yukichi = -1
higuchi = -1
noguchi = -1
def check(n,y,a,b,c):
if y/1000 == n:
global yukichi,higuchi,noguchi
yukichi = a
higuchi = b
noguchi = n
else:
if y>=0:
check(n-1,y-10000,a+1,b,c)
check(n-1,y-5000,a,b+1,c)
n,y = map(int,input().split())... |
s975707737 | p03471 | u170319289 | 1581004359 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 4008 | 436 | yukichi = -1
higuchi = -1
noguchi = -1
def check(n,y,a,b,c):
if n==0:
if y==0:
global yukichi,higuchi,noguchi
yukichi = a
higuchi = b
noguchi = c
else:
check(n-1,y-10000,a+1,b,c)
check(n-1,y-5000,a,b+1,c)
check(n-1,y-... |
s479024256 | p03471 | u381246791 | 1580919267 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 207 | #coding: utf-8
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:
print(str(x)," ",str(y)," ",str(z))
exit()
print("-1 -1 -1") |
s236883591 | p03471 | u840974625 | 1580611570 | Python | Python (3.4.3) | py | Runtime Error | 772 | 3060 | 236 | n, y = map(int, input().split())
a = -1
b = -1
c = -1
for i in range(n):
for t in range(i, n):
sum = 10000 * i + 5000 * (t - i) + 1000 * (n - t)
if sum == y:
a = i
b = t - i
c = n - t
print(x, y, z) |
s896679468 | p03471 | u840974625 | 1580611408 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 237 | n = int(input())
y = int(input())
x = -1
y = -1
z = -1
for i in range(n):
for t in range(i, n):
sum = 10000 * i + 5000 * (t - i) + 1000 * (n - t)
if sum == y:
x = i
y = t - i
z = n - t
print(x, y, z) |
s973409887 | p03471 | u462329577 | 1580519781 | Python | PyPy3 (2.4.0) | py | Runtime Error | 167 | 38640 | 191 | n,y = map(int,input().split())
ans = (-1,-1,-1)
for i in range(n+1):
for j in range(n+1-i):
if y == 1000*(i + j * 5 + (n+1-i-j) * 10 ):
print( n+1-i-j j, i)
exit()
print(-1,-1,-1)
|
s968855991 | p03471 | u506287026 | 1580187531 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3056 | 312 | N, Y = map(int, input().split())
def judge(n, target):
for x in range(n+1):
for y in range(n+1-x):
# z = n - x - y
tmp = Y - 10000 * x - 5000 * y
if z == tmp / 1000:
return '{} {} {}'.format(x, y, z)
return '-1 -1 -1'
print(judge(N, Y)) |
s467509996 | p03471 | u506287026 | 1580187441 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 316 | N, Y = map(int, input().split())
def judge(n, target):
for x in range(n+1):
for y in range(n+1-x):
# z = n - x - y
tmp = total - 10000 * x - 5000 * y
if z == tmp / 1000:
return '{} {} {}'.format(x, y, z)
return '-1 -1 -1'
print(judge(N, Y)) |
s720662443 | p03471 | u506287026 | 1580187345 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3056 | 336 | N, Y = map(int, input().split())
# N = 9
# Y = 45000
def judge(n, target):
for x in range(n+1):
for y in range(n+1-x):
# z = n - x - y
tmp = total - 10000 * x + 5000 * y
if z == tmp / 1000:
return '{} {} {}'.format(x, y, z)
return '-1 -1 -1'
pr... |
s577770451 | p03471 | u445624660 | 1580152894 | Python | Python (3.4.3) | py | Runtime Error | 16 | 2940 | 1467 | package main
import (
"bufio"
"fmt"
"os"
"reflect"
"strconv"
)
var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)
func main() {
sc.Split(bufio.ScanWords)
defer out.Flush() // !!!!coution!!!! you must use Fprint(out, ) not Print()
/* --- code ---*/
n, y := nextInt(), nextInt()
for i :=... |
s751478166 | p03471 | u574590381 | 1579670746 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 227 | n, y = list(map(int, input().split()))
for a in range(0, n+1):
for b in range(0, n-a+1):
c = n-(a+b)+1
if (10000*a + 5000*b + 1000*c) == y:
print(a, b, c)
break()
print(-1, -1, -1)
|
s284037384 | p03471 | u574590381 | 1579670695 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 235 | n, y = list(map(int, input().split()))
for a in range(0, n+1):
for b in range(0, n-a+1):
c = n-(a+b)+1
if (10000*a + 5000*b + 1000*c) == y:
print(a, b, c)
break()
print(-1, -1, -1)
|
s920056243 | p03471 | u530786533 | 1579583164 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 216 | n, y = map(int, input().split())
for nx in range(n+1):
for ny in range(n-i+1):
if (1000 * nx + 5000 + ny * 1000 * (n - nx - ny) == y):
print(nx, ny, n - nx - ny)
exit()
print(-1, -1, -1)
|
s402694496 | p03471 | u157874153 | 1579575178 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 308 | X, Y = map(int, input())
statement = False
for a in range(X+1):
for b in range(X-a+1):
c = X - a - b + 1
if a * 10000 + b * 5000 + c * 1000 == Y:
print(str(a) + " " + str(b) + " " + str(c))
statement = True
break
if statement:
break
if not statement:
print("-1 -1 -1") |
s898964458 | p03471 | u157874153 | 1579574928 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 311 | X = int(input())
Y = int(input())
statement = False
for a in range(X+1):
for b in range(X-a+1):
for c in range(X-a-b+1):
if (a * 10000 + b * 5000 + c * 1000 == Y) and (a + b + c == X):
print(str(a) + " " + str(b) + " " + str(c))
statement = True
if not statement:
print("-1 -1 -1") |
s405356930 | p03471 | u296101474 | 1579412199 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 306 | n, y = map(int, input().split())
noguchi = 1000
higuchi = 5000
yukichi = 10000
ans = '-1 -1 -1'
for i in range(n+1):
for j in range(n+1-i):
k = n - (i+j)
yen = noguchi * i + higuchi * j + yukichi * k
if yen == y:
ans = f'{k} {j} {i}'
break
print(ans)
|
s679293375 | p03471 | u296101474 | 1579412138 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 305 | n, y = map(int, input().split())
noguchi = 1000
higuchi = 5000
yukichi = 10000
ans = '-1 -1 -1'
for i in range(n+1):
for j in range(n+1-i):
k = n - (i+j)
yen = noguchi * i + higuchi * j + yukichi * k
if yen == y:
ans = f'{k} {j} {i}'
break
print(ans) |
s868389283 | p03471 | u696240348 | 1579303724 | Python | PyPy3 (2.4.0) | py | Runtime Error | 184 | 38640 | 293 | n, y = list(map(int,input().split()))
flager = 0
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)
flag = 1
break
if flag == 1:
break
if flag == 0:
print(-1,-1,-1) |
s777774067 | p03471 | u696240348 | 1579303427 | Python | PyPy3 (2.4.0) | py | Runtime Error | 203 | 41200 | 350 | n, y = list(map(int,input().split()))
flager = 0
for i in range(n+1):
print('i'+str(i))
for j in range(n-i+1):
print('j'+str(j))
if 10000*i + 5000*j + 1000*(n - i - j )==y:
print(i, j, n-i-j)
flag = 1
break
if flag == 1:
break
if ... |
s327145729 | p03471 | u617037231 | 1578921560 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 951 | def diff4(x,y,z):
temp1 = x
temp2 = z
z = temp2 - (diff//4)
if z < 0:
choge #RE CHECK
sys.exit(0)
x = temp1 + ((diff//4)*10)
print('%d %d %d' % (x,y,z))
def diff9(x,y,z):
temp1 = x
temp2 = z
z = temp2 - (diff//9)
if z < 0:
choge #RE CHECK
sys.exit(... |
s503925369 | p03471 | u936880801 | 1578771392 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 217 | 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") |
s653339627 | p03471 | u620128827 | 1578758730 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 203 | n, y = mmap(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") |
s576213349 | p03471 | u741279737 | 1578714721 | Python | PyPy3 (2.4.0) | py | Runtime Error | 171 | 38256 | 262 | i = list(map(int, input().split()))
a = i[1]%i[0]
x = i[1] // 10000
y = i[1]%10000 // 5000
z = ((i[1]%10000)%5000) //1000
if a == 0 and (x+y+z) =< i[0]:
print(x,',',y,',',z)
elif (x+y+z) > i[0]:
print('-1 -1 -1')
elif a != 1:
print('-1 -1 -1')
|
s564715369 | p03471 | u741279737 | 1578714609 | Python | PyPy3 (2.4.0) | py | Runtime Error | 162 | 38256 | 262 | i = list(map(int, input().split()))
a = i[1]%i[0]
x = i[1] // 10000
y = i[1]%10000 // 5000
z = ((i[1]%10000)%5000) //1000
if a == 0 and (x+y+z) =< i[0]:
print(x,',',y,',',z)
elif (x+y+z) > i[0]:
print('-1 -1 -1')
elif a != 1:
print('-1 -1 -1')
|
s774028197 | p03471 | u880911340 | 1578691488 | Python | Python (3.4.3) | py | Runtime Error | 856 | 3188 | 432 | N,yen=map(int,input().split())
count=0
end=0
# print(N)
# print(yen)
for i in range(N):
if end==1:
break
for j in range(N-i+1):
# print(i)
# print(j)
k=N-i-j
# print(k)
sum=i*10000+j*5000+k*1000
# print(sum)
if sum==yen:
man=i
... |
s595791172 | p03471 | u634439390 | 1578670406 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 386 |
n, y = map(int, input().split())
hasuu = n % 5
exist = False
for sen in range(hasuu, n):
for gosen in range(n):
man = n - gosen - sen
if man < 0:
break
if y == man * 10000 + gosen * 5000 + sen * 1000:
exist = True
break
if exist:
break
if ex... |
s543671746 | p03471 | u634439390 | 1578669960 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 386 |
n, y = map(int, input().split())
hasuu = n % 5
exist = False
for sen in range(hasuu, n):
for gosen in range(n):
man = n - gosen - sen
if man < 0:
break
if y == man * 10000 + gosen * 5000 + sen * 1000:
exist = True
break
if exist:
break
if ex... |
s434021551 | p03471 | u348868667 | 1578629928 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 223 | for i in range(N):
if flag:
break
for j in range(N-i):
if i*10000 + j*5000 + (N-i-j)*1000 == Y and (N-i-j) >= 0:
A,B,C = i,j,(N-i-j)
flag = True
break
print(A,B,C) |
s455306620 | p03471 | u685662874 | 1578533996 | Python | Python (3.4.3) | py | Runtime Error | 1673 | 2940 | 250 | N,Y=map(int, input().split())
result = [-1,-1,-1]
for i in range(N):
for j in range(N):
k = N - i + j
sum = 10000*i + 5000* j + 1000*k
if Y == sum:
result = [i, j, k]
break
print(result.join(" "))
|
s459116469 | p03471 | u685662874 | 1578533967 | Python | Python (3.4.3) | py | Runtime Error | 1692 | 2940 | 250 | N,Y=map(int, input().split())
result = [-1,-1,-1]
for i in range(N):
for j in range(N):
k = N - i + j
sum = 10000*i + 5000* j + 1000*k
if Y == sum:
result = [i, j, k]
break
print(" ".join(result))
|
s261291944 | p03471 | u189385406 | 1578456339 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 182 | N,Y=map(int,input().split())
for i in range(N+1):
for k range(N+1-i):
int m = N-i-k
if 10000*i + 5000*k + 1000*m == Y:
print(i k m)
exit()
print('-1' '-1' '-1') |
s229989933 | p03471 | u687053495 | 1578385299 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 191 |
for x in range(N):
for y in range(N):
z = N - x - y
if z < 0:
continue
if x * 10000 + y * 5000 + z * 1000 == Y:
print(x, y, z)
exit()
print(-1, -1, -1) |
s128402972 | p03471 | u189385406 | 1578285858 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 260 | N = int(input())
money = int(input())
Y = money//(10**4)
H = money//(10**3)
N = money//(10**2)
for i in range(Y+1):
for k in range(H+1):
for m in range(N+1):
if money = (10**4)*i +(10**3)*k+(10**2)*m:
print(i,k,m,sep=" ")
|
s315845004 | p03471 | u527616458 | 1578087213 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 3064 | 310 | n,y = list(map(int, input().split()))
a = 0
b = 0
c = 0
if 10000*(n-1)+5000 < y:
print("-1 -1 -1")
else:
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:
a = i
b = j
c = k
break
print("% % %" %(a, b, c)) |
s447897002 | p03471 | u374051158 | 1577988458 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 225 | n, y = map(int, input().split())
for a in range(n+1):
for b in range(n-a+1):
c = n-a-b
if(and 10000*a + 5000*b + 1000*c == y):
print(a, b, c)
quit()
print("-1 -1 -1") |
s574589492 | p03471 | u374051158 | 1577987242 | Python | Python (3.4.3) | py | Runtime Error | 2104 | 3060 | 263 | n, y = map(int, input().split())
for a in range(n+1):
for b in range(n+1):
for c in range(n+1):
if(a+b+c==n and 1000*a + 5000*b + 10000*c == 45000):
result = str(c) + " " + str(b) + " " + str(a)
print(result) |
s048449499 | p03471 | u724152875 | 1577919462 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 232 | li=list(map(int,input().split()))
n=li[0]
y=li[1]
for i in range(n):
for j in range(n-i):
for k in range(n-i-j):
if y=10000*i+5000*j+1000*k:
print(i,j,k)
break
print(-1,-1,-1) |
s019101303 | p03471 | u056626722 | 1577474563 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 400 | osatsu, okane = map(int, input().split())
#1万円の枚数 : x
#5千円の枚数 : y
#千円の枚数 : z
x_max = okane // 10_000
for x in range(x_max + 1):
z_max = (okane // 1_000)
tmp = z_max - osatsu - 9 * x
if tmp % 4 != 0 or tmp < 0:
continue
y = tmp // 4
z = osatsu - x - y
if z < 0:
continue
p... |
s896905594 | p03471 | u487594898 | 1577430852 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 210 | N,Y = map(int,input().split())
for i in range(int(N)):
for n in range(int(N-i)):
m = N-i-n
if i*10000+n*5000+m*1000 ==Y:
print(i,n,m)
else:
break
if 10000*i+5000*n+1000*m != Y:
print(-1,-1,-1) |
s916576314 | p03471 | u487594898 | 1577429195 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3188 | 156 | N,Y = map(int,input().split())
for a in range(N):
for b in range(N):
10000*a+5000*b+1000*(N-a-b) == Y
print(a,b,N-a-b)
break
break |
s516126028 | p03471 | u487594898 | 1577429172 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 163 | 9 45000N,Y = map(int,input().split())
for a in range(N):
for b in range(N):
10000*a+5000*b+1000*(N-a-b) == Y
print(a,b,N-a-b)
break
break |
s359459885 | p03471 | u487594898 | 1577428969 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 151 | N = int(input())
Y = int(input())
for a in range(N):
for b in range(N):
10000*a+5000*b+1000*(N-a-b) == Y
print(a,b,N-a-b)
break |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.