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
s831015010
p03471
u213854484
1545083463
Python
Python (3.4.3)
py
Runtime Error
18
3064
249
N,Y = map(int,input().split()) A = list(range(0,N+1)) B = list(range(0,N-A+1)) a=-1 b=-1 c=-1 for i in A: for j in B: if 10000*i+5000*j+1000*(N-i-j) == Y: a=i b=j c=N-i-j break print(a,b,c)
s168739193
p03471
u213854484
1545024466
Python
Python (3.4.3)
py
Runtime Error
18
3064
284
N,Y = map(int,input().split()) A = list(range(0,N+1)) B = list(range(0,N-A+1)) a=-1 b=-1 c=-1 for i in A: for j in B: if 10000*i+5000*j+1000*(N-i-j) == Y: a=i b=j c=N-i-j break a=str(a) b=str(b) c=str(c) print(a+" "+b+" "+c)
s631730575
p03471
u213854484
1545024126
Python
Python (3.4.3)
py
Runtime Error
18
3064
251
N,Y = map(int,input().split()) A = list(range(0,N+1)) B = list(range(0,N-A+1)) a=-1 b=-1 c=-1 for i in A: for j in B: if 10000*i+5000*j+1000*(N-i-j) == Y: a=i b=j c=N-i-j break print([a,b,c])
s236697906
p03471
u322529408
1544324842
Python
Python (3.4.3)
py
Runtime Error
17
2940
256
N, Y = map(int, input().split()) # x:10000円, y;5000円, z:1000円 for x in range(N+1): for y in range(N+1): z = N - (x + y) if (z >= 0) & (10000x + 5000y + 1000*z == Y): print(x, y, z) exit(0) print(-1, -1, -1)
s040815651
p03471
u322529408
1544324416
Python
Python (3.4.3)
py
Runtime Error
17
2940
210
num,total = map(int,input().split()) for i in range(num+1): for j in range(num+1): if i*10000 + j*5000 + (numsi-j)*1000 == total: print(i,j,num-i-j) exit() print("-1 -1 -1")
s509219895
p03471
u996952235
1543717934
Python
Python (3.4.3)
py
Runtime Error
18
2940
280
def a(): n, m = [int(i) for i in input().split()] for x in range(1,n+): for y in range(1, n-x+1): z = n-x-y if 1000*x + 5000*y + 10000*z == m: print('%d %d %d'%(x,y,z)) return print('-1 -1 -1') a() # 1000x + 5000y + 10000z = m # x + y + z = n
s973715186
p03471
u969850098
1543703791
Python
Python (3.4.3)
py
Runtime Error
19
3060
448
import sys num_bill, y = map(int, input().split()) for num_10000 in range(y // 10000 + 1): for num_5000 in range(min((y - num_10000 * 10000) // 5000 + 1, num_bill - num_10000 + 1)): if ((num_bill - num_10000 - num_5000) * 1000 + num_5000 * 5000 + num_10000 * 10000 == y) & (num_10000 + num_5000 + num_1000 =...
s796696598
p03471
u969850098
1543703767
Python
Python (3.4.3)
py
Runtime Error
17
3060
490
import sys num_bill, y = map(int, input().split()) for num_10000 in range(y // 10000 + 1): for num_5000 in range(min((y - num_10000 * 10000) // 5000 + 1, num_bill - num_10000 + 1)): (num_bill - num_10000 - num_5000) if ((num_bill - num_10000 - num_5000) * 1000 + num_5000 * 5000 + num_10000 * 10000 ...
s405597010
p03471
u084069244
1543622295
Python
Python (3.4.3)
py
Runtime Error
716
2940
198
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")
s714907845
p03471
u205580583
1543205000
Python
Python (3.4.3)
py
Runtime Error
1896
3188
499
n,y = map(int,input().split()) price = 0 ok = 0 for i in range(n+1): for j in range(n+1): k = n - i - j if k < 0: k = 0 price = 10000 * i + 5000 * j + 1000 * k if price == y and i+j+k == n and ok == 0: print(i, j, k) ...
s635491014
p03471
u205580583
1543204120
Python
Python (3.4.3)
py
Runtime Error
2006
3064
530
n_y = list(map(int,input().split())) price = 0 ok = 0 for i in range(n_y[0]+1): for j in range(n_y[0]+1): k = n_y[0] - i - j if k < 0: k = 0 price = 10000 * i + 5000 * j + 1000 * k if price == n_y[1] and i+j+k == n_y[0] and ok == 0: ...
s865764417
p03471
u397531548
1541623069
Python
Python (3.4.3)
py
Runtime Error
202
3064
1059
x=input() otoshi=x.split(" ") N=int(otoshi[0]) Y=int(otoshi[1]) ten_t=Y//10000 if ten_t>N: ansa=-1 ansb=-1 ansc=-1 elif ten_t==N: if Y==100000*N: ansa=N ansb=0 ansc=0 else: ansa=-1 ansb=-1 ansc=-1 elif 0<=ten_t<N: for i in range(0,ten_t+1): ...
s673717232
p03471
u397531548
1541617295
Python
Python (3.4.3)
py
Runtime Error
219
3188
1058
x=input() otoshi=x.split(" ") N=int(otoshi[0]) Y=int(otoshi[1]) ten_t=Y//10000 if ten_t>N: ansa=-1 ansb=-1 ansc=-1 elif ten_t==N: if Y==100000*N: ansa=N ansb=0 ansc=0 else: ansa=-1 ansb=-1 ansc=-1 elif 0<=ten_t<N: for i in range(0,ten_t+1): ...
s209941115
p03471
u397531548
1541617043
Python
Python (3.4.3)
py
Runtime Error
229
3064
1052
x=input() otoshi=x.split(" ") N=int(otoshi[0]) Y=int(otoshi[1]) ten_t=Y//10000 if ten_t>N: ansa=-1 ansb=-1 ansc=-1 elif ten_t==N: if Y==100000*N: ansa=N ansb=0 ansc=0 else: ansa=-1 ansb=-1 ansc=-1 elif ten_t<N: for i in range(0,ten_t+1): ...
s063618362
p03471
u168856931
1541102024
Python
Python (2.7.6)
py
Runtime Error
11
2568
263
import sys N, Y = map(int, input().split()) res = (-1, -1, -1) for x in range(N + 1): for y in range(N + 1 - x): if 0 <= N - x - y and 10000*x + 5000*y + 1000*(N - x - y) == Y: print(x, y, N-x-y) sys.exit() print("-1 -1 -1")
s206527832
p03471
u488497128
1541101474
Python
Python (3.4.3)
py
Runtime Error
17
3060
340
import sys n, y = list(map(int, sys.stdin.readline().strip().split(" "))) t_list = [] for a in range(n + 1): for b in range(n-i+1): #t_list.append((n-i-j, j, i)) c = n-a-b if 10000 * a + 5000 * b + 1000 * c == y: print(" ".join([str(a), str(b), str(c)])) sys.exit()...
s758382881
p03471
u488497128
1541100849
Python
Python (3.4.3)
py
Runtime Error
18
3060
331
import sys n, y = list(map(int, sys.stdin.readline().strip().split(" "))) t_list = [] for i in range(n + 1): for j in range(n-i+1): t_list.append(N-i-j, j, i) for a, b, c in t_list: if 10000 * a + 5000 * b + 1000 * c == y: print(" ".join([str(a), str(b), str(c)])) sys.exit() print("...
s274852966
p03471
u488497128
1541100772
Python
Python (3.4.3)
py
Runtime Error
20
3060
331
import sys n, y = list(map(int, sys.stdin.readline(),strip().split(" "))) t_list = [] for i in range(n + 1): for j in range(n-i+1): t_list.append(N-i-j, j, i) for a, b, c in t_list: if 10000 * a + 5000 * b + 1000 * c == y: print(" ".join([str(a), str(b), str(c)])) sys.exit() print("...
s642792069
p03471
u513081876
1541093091
Python
Python (3.4.3)
py
Runtime Error
17
2940
298
N, Y = map(int, input().split()) Y = Y //1000 #x, y, z =1, 5, 10 for x in range(N+1): y = (10*N-9*x-Y)//5 z = ((-5*N)+Y+4*x)//5 if (-5*N+y+4*x) % 5 == 0 and (10*N-9*x-Y) % 5 == 0 and y >= 0 and z >= 0 and x+y+z = Y: print(x, y, z) break else: print(-1, -1, -1)
s054991045
p03471
u045091221
1540761107
Python
Python (3.4.3)
py
Runtime Error
17
3064
314
def solve(N, Y): for x in range(N + 1): for y in range(0, N - x + 1): z = N - x - y elif 10000 * x + 5000 * y + 1000 * z == Y: return x, y, z return -1, -1, -1 N, Y = list(map(int, input().split())) x, y, z = solve(N, Y) print('{} {} {}'.format(x, y, z))
s180057713
p03471
u546943614
1539525729
Python
Python (3.4.3)
py
Runtime Error
17
2940
195
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])
s689599541
p03471
u940102677
1538116126
Python
Python (3.4.3)
py
Runtime Error
17
2940
332
n, y = map(int, input().split()) y /= 1000 flag = 0 a = 0 while 10*a <= y: b = 0 while 5*b + 10*a <=y: r = y - 10*a - 5*b if n = a + b + r: print(a) print(b) print(r) flag = 1 break b += 1 if flag = 1: break a += 1 if flag = 0: print(-1) print(-1) print(-1...
s088612419
p03471
u157850041
1537821333
Python
Python (3.4.3)
py
Runtime Error
761
3060
234
n, y = list(map(int, input().split())) for i in range(n + 1): for j in range((n + 1) - i + 1): k = n - i - j if i * 10000 + j * 5000 + k * 1000 == y: print(i, j, k) exit(1) print(-1, -1, -1)
s261771605
p03471
u260469505
1537051935
Python
Python (3.4.3)
py
Runtime Error
2122
305088
309
n, y = map(int, input().split()) lists=[] lists_2=[] for i in range(n+1): for j in range(n+1-i): lists.append([i, j, n-i-j]) for k in lists: if 10000*k[0] + 5000*k[1] + 1000*k[2] == y: lists_2.append(k) if len(k) == 0: print('-1 -1 -1') else: print(lists_2[0][0],lists_2[0][1],lists_2[0][2])
s303838856
p03471
u415905784
1536033997
Python
Python (3.4.3)
py
Runtime Error
17
3064
294
N, Y = map(int, input().split()) Y //= 1000 if Y > N: print(-1, -1, -1) break A, B, C = [0, 0, N] while Y - N >= 9: C -= 1 A += 1 Y -= 9 while Y - N >= 4: C -= 1 B += 1 Y -= 4 while Y > N and A > 0: A -= 1 B = 2 Y -= 1 if Y == N: print(A, B, C) else: print(-1, -1, -1)
s804132991
p03471
u427344224
1534447963
Python
Python (3.4.3)
py
Runtime Error
18
2940
272
N, Y = map(int, input().split()) x = -1 y = -1 z = -1 for a in range(N): for b in range(N): c = N - a -b if 10000 * a + 5000 * b + 1000 * c == Y: x, y, z = a, b, c print(f"{x} {y} {z}") exit() print(f"{x} {y} {z}")
s358606121
p03471
u659640418
1534141248
Python
Python (3.4.3)
py
Runtime Error
17
2940
257
n, y = map(int, input().split()) ans = 0 for i in range(n+1): for j in range(n+1-i): for k in range(n+1-i-j): if y == 10000*i + 5000*j + 1000*k: print(i j k) ans += 1 if ans == 0: print("-1 -1 -1")
s030031490
p03471
u659640418
1534141125
Python
Python (3.4.3)
py
Runtime Error
17
3064
257
n. y = map(int, input().split()) ans = 0 for i in range(n+1): for j in range(n+1-i): for k in range(n+1-i-j): if y == 10000*i + 5000*j + 1000*k: print(i j k) ans += 1 if ans == 0: print("-1 -1 -1")
s859822073
p03471
u638725699
1533955385
Python
Python (3.4.3)
py
Runtime Error
17
3064
273
a,b = map(int,input().split()) f = 0 for i in range(a+1): if f == 1: break for j in range(a+1-i): if f == 1: break k = a+1-i-k if (i*10000 + j*5000 + k*1000) == b: f = 1 print(i,j,k) if f == 0: print(-1,-1,-1)
s740652997
p03471
u283929013
1533401637
Python
Python (3.4.3)
py
Runtime Error
1150
3064
668
N, Y = map(int, input().split()) flag = True def f(x_1,x_2): global flag x_3 = int((Y - 10000*x_1 - 5000*x_2) / 1000) if x_1 + x_2 + x_3 == N: print(str(x_1) + " " + str(x_2) + " " + str(x_3)) flag = False for i in range(Y // 10000 + 1): spliting = i + int((Y - 10000*i) / 2 // 5000) ...
s271315491
p03471
u933622697
1533307380
Python
Python (3.4.3)
py
Runtime Error
17
2940
250
n , y= map(int, input().split()) for i in range(n + 1): for j in range(n + 1 - i): if 10000 * i + 5000 * j + 1000 * k == y: print(i, j, n - i - j) exit() print(-1, -1, -1)
s197129473
p03471
u283929013
1533262150
Python
Python (3.4.3)
py
Runtime Error
1040
3064
664
N, Y = map(int, input().split()) flag = True def f(x_1,x_2): global flag x_3 = int((Y - 10000*x_1 - 5000*x_2) / 1000) if x_1 + x_2 + x_3 == N: print(str(x_1) + " " + str(x_2) + " " + str(x_3)) flag = False for i in range(Y // 10000 + 1): spliting = int((Y - 10000*i) / 2 // 5000) ...
s890803390
p03471
u967835038
1531528490
Python
Python (3.4.3)
py
Runtime Error
854
3064
719
n,y=map(int,input().split()) a=0 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: a+=1 else: pass if a == 1: print(i,j,k) break else: pass if a >= 1: break if a ==0...
s436702211
p03471
u492532572
1530940684
Python
Python (3.4.3)
py
Runtime Error
676
3064
414
N, Y = map(int, input().split(" ")) found = False for x in range(N + 1): if 10000 * x + 5000 * (N - x) + 1000 * (N - x) < Y: continue for y in range(N - x + 1): if 10000 * x + 5000 * y + 1000 * (N - x - y) == Y: print("{} {} {}".format(x,y,z)) found = True bre...
s963608906
p03471
u492532572
1530938605
Python
Python (3.4.3)
py
Runtime Error
17
2940
270
N, Y = map(int, input().split(" ")) for x in range(N + 1): for y in range(N - x + 1): for z in range(N - x - y + 1): if Y === 10000 * x + 5000 * y + 1000 * z: print("{} {} {}".format(x,y,z)) break print("-1 -1 -1")
s607697019
p03471
u492532572
1530938562
Python
Python (3.4.3)
py
Runtime Error
17
2940
268
N, Y = map(int, input().split(" ")) for x in range(N + 1): for y in range(N - x + 1): for z in range(N - x - y + 1): if Y = 10000 * x + 5000 * y + 1000 * z: print("{} {} {}".format(x,y,z)) break print("-1 -1 -1")
s336779700
p03471
u029169777
1528667562
Python
Python (3.4.3)
py
Runtime Error
805
3064
247
N,Y=map(int,input().split()) answer=[] try: for i in range(N+1): for j in range(N-i+1): sum=i*10000+j*5000+(N-i-j)*1000 if sum==Y: raise Exception except Exception: answer=[i,j,N-i-j] print(answer) else: print[-1,-1,-1]
s927107670
p03471
u734816542
1527624413
Python
Python (3.4.3)
py
Runtime Error
18
3060
223
n, y = map(int, input().split()) for i in range(0, n+1): for j in range(0, n+1-i): k = n - (i + j) sum_price = 10000*i + 5000*j + 1000*k if n == i + j + k and sum_price == y: print(i, j, k) exit() print(-1, -1, -1)
s077013511
p03471
u734816542
1527624208
Python
Python (3.4.3)
py
Runtime Error
19
2940
263
n, y = map(int, input().split()) for i in range(0, n+1): for j in range(0, n+1-i): k = n - (i + j) sum_price = 10000*i + 5000*j + 1000*k if n == i + j + k and sum_price == y: print(i, j, k) exit() print(-1, -1, -1)
s082483486
p03471
u783232909
1526936250
Python
Python (3.4.3)
py
Runtime Error
19
3060
379
#!/usr/bin/env python # -*- coding: utf-8 -*- N,Y = map(int, input().split()) if Y % 1000 != 0: print("-1 -1 -1") exit(1) for sen in range(0, N+1): for gosen in range(0, N+1): if sen+gosen > N: print("-1 -1 -1") exit(1) man = N - sen - gosen if 10000*man + 5000*gosen + 1000*sen == Y: ...
s421751593
p03471
u578406587
1526517239
Python
Python (3.4.3)
py
Runtime Error
20
2940
191
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])
s054952820
p03471
u578406587
1526516693
Python
Python (3.4.3)
py
Runtime Error
17
3060
421
N = int(input()) Y = int(input()) flag = 0 for num_so in range(N): if flag == 1: break for num_fs in range(N): num_ts = N - num_so - num_fs sum = num_ts * 10000 + num_fs * 5000 + num_so * 1000 if flag == 1: break elif sum == Y and num_ts > 0: print...
s651642847
p03471
u578406587
1526511817
Python
Python (3.4.3)
py
Runtime Error
19
3064
454
N = int(input()) Y = int(input()) flag = 0 for num_so in range(N): if flag == 1: break for num_fs in range(N): num_ts = N - num_so - num_fs sum = num_ts * 10000 + num_fs * 5000 + num_so * 1000 if flag == 1 or num_ts < 0: break elif num_ts + num_fs + num_so == ...
s398091120
p03471
u578406587
1526511662
Python
Python (3.4.3)
py
Runtime Error
18
3060
454
N = int(input()) Y = int(input()) flag = 0 for num_fs in range(N): if flag == 1: break for num_so in range(N): num_ts = N - num_so - num_fs sum = num_ts * 10000 + num_fs * 5000 + num_so * 1000 if flag == 1 or num_ts < 0: break elif num_ts + num_fs + num_so == ...
s426671470
p03471
u136090046
1525830516
Python
Python (3.4.3)
py
Runtime Error
877
3060
335
n, y = map(int, input().split()) flag = False for z in range(n + 1)[::-1]: rem1 = n - z + 1 for y in range(rem1)[::-1]: x = n - z - y val = 10000 * x + 5000 * y + 1000 * z if val == y: flag = True break if flag: break if not flag: x, y, z = -1 ...
s655825682
p03471
u172823566
1525556902
Python
Python (3.4.3)
py
Runtime Error
17
2940
305
dev solve(): n, y = map(int, input().split()) y //= 1000 for nogu in range(n + 1): for higu in range(n + 1 - nogu): yuki = n - nogu - higu if nogu + higu * 5 + yuki * 10 == y: print(yuki, higu, nogu) return print("-1 -1 -1") if __name__=='__main__': solve()
s346045465
p03471
u172823566
1525556586
Python
Python (3.4.3)
py
Runtime Error
17
2940
293
N, Y = map(int, input().split()) for x in range(N): for y in range(N): z = N - x - y if z < 0: break if 10000 * x + 5000 * y + 1000 * z == Y: return " ".join([str(x), str(y), str(z)]) return "-1 -1 -1"
s276382305
p03471
u147458211
1524681317
Python
Python (3.4.3)
py
Runtime Error
18
3060
394
n, total = map(int, input().split()) x=0 y=0 z=0 found = False for i in range(int(total / 10000)): x = i for j in range(int((total - 10000 * i) / 5000)): y = j z = n - x - y sum = 10000 * x + 5000 * y + 1000 * z if sum == total found = True break if found == True break if foun...
s891261343
p03471
u147458211
1524680821
Python
Python (3.4.3)
py
Runtime Error
17
2940
390
n, total = map(int, input().split()) x=0 y=0 z=0 while True: found = False while True: z = n - x - y sum = 10000 * x + 5000 * y + 1000 * z if sum == total found = True break elif sum > total break y =+ 1 if found == True break if 10000 * x > total x = -1 y...
s674177502
p03471
u499259667
1524260755
Python
Python (3.4.3)
py
Runtime Error
17
2940
278
n,y=map(int,input().split()) for i in range(n-1): a10000=i+1 for i2 in range(n-1-a10000): a5000=i2+1 for i3 in range(n-1-a10000-a5000): a1000=i3+1 if a10000*10000+a5000*5000+a1000*1000==y print(a10000,a5000,a1000) exit() print("-1 -1 -1")
s314469254
p03471
u499259667
1524260680
Python
Python (3.4.3)
py
Runtime Error
17
2940
289
n,y=map(int,input().split()) for i in range(n-1): a10000=i+1 for i2 in range(n-1-a10000): a5000=i2+1 for i3 in range(n-1-a10000-a5000): a1000=i3+1 if a10000*10000+a5000*5000+a1000*1000==y: print(a10000,a5000,a1000) exit() print("-1 -1 -1")
s068578537
p03471
u503901534
1524191310
Python
Python (3.4.3)
py
Runtime Error
682
3060
350
n, y = map(int,input().split()) s = [] for i in range(n): for j in range(n-i): if i * 10000 + j * 5000 + (n-i-j) * 1000 == y: s.append(i) s.append(j) s.append(k) break if s ==[]: print('-1 -1 -1') else: print(str(s[0]) + ' ' + str(s[1]) + ...
s655617110
p03471
u171276253
1523731891
Python
Python (3.4.3)
py
Runtime Error
18
3064
308
n, y = map(int, input().rstrip().split()) y //= 1000 max_a = y // 10 b = 0 key = True for a in range(1,max_a+1): b = (y - n - 9*a) / 4 if b % 10 == 0 and n-a-b>=0: key = False break c = n - a - b if key: a,b,c = -1,-1,-1 print(a, end=" ") print(int(b), end=" ") print(int(c))
s637308674
p03471
u400596590
1523402268
Python
PyPy3 (2.4.0)
py
Runtime Error
170
38256
200
n, y = map(int, input().split()) 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")
s773311721
p03471
u400596590
1523402254
Python
PyPy3 (2.4.0)
py
Runtime Error
172
38640
196
n, y = map(int, input().split()) 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")
s249339615
p03471
u400596590
1523402123
Python
PyPy3 (2.4.0)
py
Runtime Error
172
38628
198
n, y = map(int, input().split()) 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")
s808190874
p03471
u400596590
1523402080
Python
Python (3.4.3)
py
Runtime Error
17
3060
198
n, y = map(int, input().split()) 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")
s954042082
p03471
u400596590
1523401977
Python
Python (3.4.3)
py
Runtime Error
18
2940
223
n, y = map(int, input().split()) 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() else: print("-1 -1 -1")
s381432046
p03471
u400596590
1523401892
Python
Python (3.4.3)
py
Runtime Error
18
3064
230
n, y = map(int, input().split()) ans = 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) exit() else: print('-1 -1 -1')
s966806542
p03471
u400596590
1523401819
Python
Python (3.4.3)
py
Runtime Error
17
3060
211
n, y = map(int, input().split()) ans = 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) else: print('-1 -1 -1')
s931624297
p03471
u040380068
1523048536
Python
Python (2.7.6)
py
Runtime Error
296
2692
291
def searchyen(n, y): for i in range(0, n+1): for j in range(0, n+1-i): if 10000*i + 5000*j + 1000*(n-i-j) == y: return [i, j, k] return [-1, -1, -1] inpt = map(int, raw_input().split()) ans = searchyen(inpt[0], inpt[1]) print str(ans[0]) + ' ' + str(ans[1]) + ' ' + str(ans[2])
s030787676
p03471
u050428930
1522701953
Python
Python (3.4.3)
py
Runtime Error
17
3060
150
N,ans,x=int(input()),0,0 s=sorted([int(input()) for i in range(N)]) for i in range(N): if s[i]>x: ans+=1 x=s[i] print(ans)
s471543731
p03471
u524619829
1521917291
Python
Python (3.4.3)
py
Runtime Error
17
3060
413
# -*- coding: utf-8 -*- def main(): n = int(input()) y = int(input()) for a in range(n + 1): if (a * 10000 > y): continue for b in range((n + 1) - a): c = n - (a + b) if ((a * 10000 + b * 5000 + c * 1000) == y): print('{} {} {}'.format(a,...
s957796333
p03471
u257350577
1521673609
Python
Python (3.4.3)
py
Runtime Error
17
2940
472
n,y=map(int,input().split()) flag=False if 10000*n<y: print(-1 -1 -1) elif 10000*n==y: print(n 0 0) else: for i in range(n+1): if flag: break for j in range(n+1): if flag: brake for k in range(n+1): if 10000*i+5000*j+1000*k=...
s483985298
p03471
u391533749
1521438099
Python
Python (3.4.3)
py
Runtime Error
17
2940
399
N,Y = map(int, input().split()) a = Y//10000 b = Y//5000 flag = False for i in range(a+1): if flag == True: break for j in range(b+1): if N-i-j<0: break: if i*10000+j*5000+(N-i-j)*1000 == Y: flag = True s = i t = j u = N-i-j...
s104669478
p03471
u702582248
1521243048
Python
Python (3.4.3)
py
Runtime Error
17
2940
417
n, y = map(int, input().split()) yen = [1000, 5000, 10000] def f(): for i range(n): r = yen[2] * i if r > y: continue for j range(n): if i + j > n: continue r += yen[1] * j + yen[1] * (n - i -j) if r == y: p...
s330924202
p03471
u702582248
1521243005
Python
Python (3.4.3)
py
Runtime Error
17
2940
343
n, y = map(int, input().split()) yen = [1000, 5000, 10000] def f(): for i range(n): r = yen[2] * i if r > y: continue for j range(n): if i + j > n: continue r += yen[1] * j + yen[1] * (n - i -j) if r == y: print('{} {} {}".format(i, j, n - i - j)) return ...
s478562473
p03471
u941884460
1520710113
Python
Python (3.4.3)
py
Runtime Error
178
3316
452
N,Y=map(int,input().split()) Y = Y/1000 a,b,c =0,0,0 if 10*N < Y: a,b,c = -1,-1,-1 elif Y/10 + Y%5 > float(N): a,b,c = -1,-1,-1 else: flg = True for n in range(int(N/5)+1): c = int(Y%5 + 5*n) for i in range(N-c+1): if (5*i + 5*N) == (Y + 4*c): flg = False ...
s561332430
p03471
u440061288
1519998325
Python
Python (3.4.3)
py
Runtime Error
18
3064
306
N = int(input()) Y = int(input()) ans = [-1,-1,-1] for x in range(N): for y in range(N): for z in range(N): if x+y+z==N and 10000*x+5000*y+1000*z==Y: ans[0] = x ans[1] = y ans[2] = z print("{0} {1} {2}".format(ans[0],ans[1],ans[2]))
s266266968
p03471
u772180901
1519790861
Python
Python (3.4.3)
py
Runtime Error
18
2940
222
n,y = map(int,input().split()) for i in range(n+1): for j in range(n+1): k = n - i - j if 10000 * i + 5000 * j + 1000 * k == y and y >= 0: print(i,j,k) exit() print('-1 -1 -1'):
s004023769
p03471
u364403133
1519203926
Python
PyPy3 (2.4.0)
py
Runtime Error
171
38640
569
n, y = map(int, input().split()) a = 0 # 1000 b = 0 # 5000 c = 0 # 10000 c = y//10000 b = (y - c*10000)//5000 a = (y - c*10000 - b*5000)//1000 #print(c,b,a) flag = True while (a+b+c) <= n: num = a+b+c if num == n: print(c, b, a) flag = False break else: if num + 9 <= n...
s049034596
p03471
u086612293
1518655923
Python
Python (3.4.3)
py
Runtime Error
1021
3056
396
#!/usr/bin/python3 # -*- coding: utf-8 -*- import sys def main(): n, y = map(int, sys.stdin.readline().split()) for i in range(y // 10000): for j in range((y - 10000 * i) // 5000): if 10000 * i + 5000 * j + 1000 * (n - i - j) == y: print(i, j, k) sys.exit()...
s979311208
p03471
u086612293
1518655827
Python
Python (3.4.3)
py
Runtime Error
1023
3056
369
#!/usr/bin/python3 # -*- coding: utf-8 -*- import sys def main(): n, y = map(int, sys.stdin.readline().split()) for i in range(y // 10000): for j in range((y - 10000 * i) // 5000): if 10000 * i + 5000 * j + 1000 * (n - i - j) == y: print(i, j, k) else: print('-...
s704438518
p03471
u086612293
1518655354
Python
Python (3.4.3)
py
Runtime Error
18
3188
704
#!/usr/bin/python3 # -*- coding: utf-8 -*- import sys def out(i, j, k): print(i, j, k) print(10000 * i + 5000 * j + 1000 * k) sys.exit() def main(): n, y = map(int, sys.stdin.readline().split()) for i in range(y // 10000, -1, -1): z = y - 10000 * i if i != n: continue...
s312893499
p03471
u688375653
1518381714
Python
Python (3.4.3)
py
Runtime Error
18
3064
378
s=input() s=s.split(' ') maisuu = int(s[0]) maney = int(s[1]) minn_man = int(maney/10000)+1 minn_go = int(maney / 5000) +1 for man in range(0,minn_man): for go in range(0,minn_go): # for sen in range(0,minn_sen): sen = maisuu - go - man if sen>0: if man*10000+ go*5000 + sen*1000 == maney: print(str(ma...
s894114929
p03471
u667949809
1518297418
Python
Python (3.4.3)
py
Runtime Error
17
3064
345
def Otoshidama(): N,Y = input().split() N = int(N) Y = int(Y) for i in range(N+1): for j in range(N-i+1): for k in range(N-i-j+1): ans = 10000*i + 5000*j + 1000*k if Y == ans: return(i,j,k) return(-1,-1,-1) One,Two,Three = Otos...
s276533241
p03471
u934099192
1517103044
Python
Python (3.4.3)
py
Runtime Error
17
3064
354
n, y0 = map(int, raw_input().split()) y1 = y0 / 1000 A = y1 - n x = 0 y = 0 ans_flag = False for x in range(int(A / 9)): if ans_flag: break for y in range(int(A / 4)): if 9 * x + 4 * y == A: z = n - x - y ans_flag = True break if ans_flag: print("%d %d %d" % (x,y,z)) else...
s008327300
p03471
u934099192
1517102847
Python
Python (3.4.3)
py
Runtime Error
18
3064
311
n,y0 = map(int, raw_input().split()) y1 = y0 / 1000 A = y1 - n x = 0 y = 0 ans_flag = False for x in range(int(A / 9)): for y in range(int(A / 4)): if 9 * x + 4 * y == A: z = n - x - y ans_flag = True if ans_flag: print("%d %d %d" % (x,y,z)) else: print("%d %d %d" % (-1,-1,-1))
s857172757
p03471
u454481887
1516577834
Python
Python (3.4.3)
py
Runtime Error
17
3060
131
x,y = map(int,input().split()) d = y a = (d*7)%9 b = (d-a*4) c = n-a-b if c>=0 and b>=0: print(b,a,c) else: print(-1,-1,-1)
s393549335
p03471
u454481887
1516577742
Python
Python (3.4.3)
py
Runtime Error
17
3060
131
x,y = map(int,input().sprit()) d = y a = (d*7)%9 b = (d-a*4) c = n-a-b if c>=0 and b>=0: print(b,a,c) else: print(-1,-1,-1)
s399543627
p03471
u454481887
1516577641
Python
Python (3.4.3)
py
Runtime Error
18
2940
130
x,y = map(int(input().sprit) d = y a = (d*7)%9 b = (d-a*4) c = n-a-b if c>=0 and b>=0: print(b,a,c) else: print(-1,-1,-1)
s032553084
p03471
u339443002
1516344462
Python
Python (2.7.6)
py
Runtime Error
12
2692
63
n, y = map(int, raw_input().strip().split()) if y % 1000 != 0:
s178798246
p03471
u641097045
1515771850
Python
Python (2.7.6)
py
Runtime Error
2108
12432
1065
import numpy as np import pdb def main(): NY = np.array(raw_input().split(' ')).astype(int) N = NY[0] Y = NY[1] possibility, answer = determine(N,Y) print answer def determine(N,Y): returnarray = np.array([-1, -1, -1]) possibility = False if N == 0 and Y == 0: returnarray = np...
s476477014
p03471
u861966572
1515717428
Python
Python (3.4.3)
py
Runtime Error
18
3064
135
N,Y=input().split( ) N1=Y/10000 N2=(N-N1*10000)/5000 N3=(N-N1*10000-N2*5000)/1000 if((N1+N2;N3)==N) print(N1 N2 N3) else if (-1 -1 -1)
s438947337
p03471
u451017206
1515553655
Python
PyPy3 (2.4.0)
py
Runtime Error
172
38768
334
from math import ceil n, h = map(int, input().split()) a = [] b = [] for i in range(n): ai, bi = map(int,input().split()) a.append(ai) b.append(bi) ans = 0 maxa = max(a) b2 = sorted([i for i in b if i > maxa],reverse=True) for k in b2: if h > 0: ans += 1 h -= k if h > 0: ans += ceil(h/ma...
s940287703
p03471
u669062920
1515524732
Python
Python (3.4.3)
py
Runtime Error
251
3064
415
l = list(map(int, input().split())) N = l[0] Y = l[1] ans = [-1,-1,-1] if Y/10000 < N: for i in range(int(Y/10000)+1): a = i n = N - a Y1 = Y - (a * 10000) if Y1/5000 < n: for j in range(int(Y1/5000)+1): b = j c = n - j if...
s723893325
p03471
u669062920
1515524058
Python
Python (3.4.3)
py
Runtime Error
18
3188
924
l = list(map(int, input().split())) N = l[0] Y = l[1] ans = [-1,-1,-1] ...
s369775959
p03471
u669062920
1515523795
Python
Python (3.4.3)
py
Runtime Error
18
2940
1101
l = list(map(int, input().split())) N = l[0] Y = l[1] ans = [-1,-1,-1] ...
s470276583
p03471
u868418093
1515469037
Python
Python (3.4.3)
py
Runtime Error
1254
3064
331
setting = input().rstrip().split(" ") N = int(setting[0]) Y = int(setting[1]) for x in range(N): for y in range(N): if N-x-y >= 0: if 10000*x + 5000*y + 1000*(N-x-y) == Y : otoshidama = [x,y,N-x-y] else: pass print(otoshidama[0]," ",otoshidama[1]," ",otoshi...
s539582756
p03471
u868418093
1515468453
Python
Python (3.4.3)
py
Runtime Error
1363
3188
300
setting = input().rstrip().split(" ") N = int(setting[0]) Y = int(setting[1]) for x in range(N): for y in range(N): if 10000*x + 5000*y + 1000*(N-x-y) == Y : otoshidama = [x,y,N-x-y] else: pass print(otoshidama[0]," ",otoshidama[1]," ",otoshidama[2])
s099433624
p03471
u075012704
1515454389
Python
Python (3.4.3)
py
Runtime Error
19
3064
307
N, Y = map(int, input().split()) # x:10000円, y;5000円, z:1000円 for x in range(N+1): for y in range(N-x+1): # 5000円の枚数をN-(10000円の枚数)までに制限 z = N - (x + y) if 10000*x + 5000*y + 1000*z == Y: print(x, y, z) exit(0) print(-1, -1, -1)
s545700438
p03471
u952708174
1515388045
Python
Python (3.4.3)
py
Runtime Error
20
3060
810
def c_Otoshidama_N(N, Y): yen = Y // 1000 # yukichi,higuchi,noguchiはそれぞれ、1万円札、5千円札、千円札の枚数(モデルの名字) for yukichi in range(0, 2001): # 10*yukichi + 5*higuchi + noguchi = yen と # yukichi + higuchi + noguchi = N について、yukichiを決めたときの連立方程式の解 tmp1 = (yen - N - 9 * yukichi) tmp2 = (5 * ...
s420626014
p03471
u089869622
1515384219
Python
Python (3.4.3)
py
Runtime Error
18
2940
55
n, y = map(int, raw_input().split()) print("-1 -1 -1")
s560485547
p03471
u089869622
1515384124
Python
Python (3.4.3)
py
Runtime Error
17
2940
58
#main n, y = map(int, raw_input().split()) solve(n, y)
s915562075
p03471
u089869622
1515384080
Python
Python (3.4.3)
py
Runtime Error
17
3064
387
def solve(n, y): for man in range(n + 1): for gosen in range(n - man + 1): sen = n - man - gosen if 10000*man + gosen*5000 + sen*1000 == y and man + gosen + sen == n: print('{} {} {}'.format(man, gosen, sen)) return print("-1 -1 -1") return ...
s216625726
p03471
u089869622
1515383954
Python
Python (3.4.3)
py
Runtime Error
18
3060
384
def solve(n, y): for man in range(n + 1): for gosen in range(n - man + 1): sen = n - man - gosen if 10000*man + gosen*5000 + sen*1000 == y and man + gosen + sen == n: print('{} {} {}'.format(man, gosen, sen)) return print("-1 -1 -1") return ...
s155338206
p03471
u089869622
1515383653
Python
Python (3.4.3)
py
Runtime Error
19
3060
390
def solve(n, y): for man in range(0, n + 1): for gosen in range(0, n - man + 1): sen = n - man - gosen if 10000*man + gosen*5000 + sen*1000 == y and man + gosen + sen == n: print('{} {} {}'.format(man, gosen, sen)) return print("-1 -1 -1") retu...
s702172800
p03471
u089869622
1515383252
Python
Python (3.4.3)
py
Runtime Error
17
3060
394
def solve(n, y): for man in range(0, n + 1): for gosen in range(0, n - man + 1): sen = n - man - gosen if 10000*man + gosen*5000 + sen*1000 == y and man + gosen + sen == n: print('{} {} {}'.format(man, gosen, sen)) return 0 print("-1 -1 -1") re...
s456504434
p03471
u089869622
1515383175
Python
Python (3.4.3)
py
Runtime Error
18
3060
395
def solve(n, y): for man in range(0, n + 1): for gosen in range(0, n - man + 1): sen = n - man - gosen if 10000*man + gosen*5000 + sen*1000 == y and man + gosen + sen == n: print('{} {} {}'.format(man, gosen, sen)) return 0 print("-1 -1 -1") r...
s383694576
p03471
u089869622
1515382990
Python
Python (3.4.3)
py
Runtime Error
17
3060
376
def solve(n, y): for man in range(0, n + 1): for gosen in range(0, n - man + 1): sen = n - man - gosen if 10000*man + gosen*5000 + sen*1000 == y and man + gosen + sen == n: print(man, gosen, sen) return 0 print("-1 -1 -1") return 0 ...