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
s236998530
p03471
u802772880
1554392821
Python
Python (3.4.3)
py
Runtime Error
698
3064
257
N,Y=map(int,input().split()) Y=Y//1000 error='-1 -1 -1' for x in range(N+1): for y in range(N+1-x): z=N-x-y if 10*x+5*y+z==Y and z>=0: ans=str(x[0])+' '+str(y[0])+' '+str(z[0]) exit() print(error)
s196984160
p03471
u217940964
1554248384
Python
Python (3.4.3)
py
Runtime Error
18
3064
941
from numba import jit N, Y = map(int, input().split()) count_max = Y / 1000 # all 1000 @jit def sample(n, y): ans = '-1 -1 -1' for i in reversed(range(y // 10000 + 1)): count_tmp1 = count_max - 9 * i price_tmp1 = y - 10000 * i if count_tmp1 < n or price_tmp1 < 0: continue ...
s238254092
p03471
u514299323
1554040065
Python
Python (3.4.3)
py
Runtime Error
17
2940
252
N,Y = map(int,input().split(" ")) K = Y//1000 -N l = int(-K/4) if l <= -2*K/9: a = K+4*l b = -2*K-9*l c = N-a-b if c >=0: print(a," ",b," ",c) else: print(-1," ",-1," ",-1) else: print(-1," ",-1," ",-1)
s880711541
p03471
u833492079
1553951840
Python
Python (3.4.3)
py
Runtime Error
2104
3064
522
import sys def p(s): sys.stderr.write(str(s)+"\n") N,Y=map(int, input().split()) p(N) p(Y) Amax=min(N,Y//10000) Bmax=min(N,Y//5000) Cmax=min(N,Y//1000) p(Amax) p(Bmax) p(Cmax) for a in range(Amax,-1,-1): B=min(Bmax,N-a) p("B="+str(B)) for b in range(B,-1,-1): C=min(Cmax,N-a-b) p("a="+str(a)+", B="+...
s324459623
p03471
u833492079
1553951637
Python
Python (3.4.3)
py
Runtime Error
2104
3064
521
import sys def p(s): sys.stderr.write(str(s)+"\n") N,Y=map(int, input().split()) p(N) p(Y) Amax=min(N,Y//10000) Bmax=min(N,Y//5000) Cmax=min(N,Y//1000) p(Amax) p(Bmax) p(Cmax) for a in range(Amax,-1,-1): B=min(Bmax,N-a) p("B="+str(B)) for b in range(B,-1,-1): C=min(Cmax,N-a-b) p("a="+str(a)+", B="+...
s396176665
p03471
u833492079
1553951186
Python
Python (3.4.3)
py
Runtime Error
2104
3064
513
import sys def p(s): sys.stderr.write(str(s)+"\n") N,Y=map(int, input().split()) p(N) p(Y) Amax=min(N,Y//10000) Bmax=min(N,Y//5000) Cmax=min(N,Y//1000) p(Amax) p(Bmax) p(Cmax) for a in range(Amax,-1,-1): B=min(Bmax,N-a) p("B="+str(B)) for b in range(B,-1,-1): C=min(Cmax,N-a-b) p("a="+str(a)+", B="+...
s068315127
p03471
u833492079
1553948611
Python
Python (3.4.3)
py
Runtime Error
2104
3064
471
import sys def p(s): sys.stderr.write(str(s)+"\n") N,Y=map(int, input().split()) p(N) p(Y) Amax=min(N,Y//10000) Bmax=min(N,Y//5000) Cmax=min(N,Y//1000) p(Amax) p(Bmax) p(Cmax) for a in range(Amax+1): B=min(Bmax,N-a) p("B="+str(B)) for b in range(B+1): C=min(Cmax,N-a-b) #p("C="+str(C)) for c in ran...
s732217369
p03471
u358051561
1553904050
Python
Python (3.4.3)
py
Runtime Error
17
3064
297
import sys sys.setrecursionlimit(100000000) N, Y = map(int, input().split()) y = Y//1000 li = [[10*a+5*b+(N - a - b), a, b, N- a-b] for a in range(N+1) for b in range(N+1-a) if 10*a+5*b+(N - a - b) == y] if len(li) == 0: print('-1 -1 -1') else: x = li[0] print(f'{x[1]} {x[2]} {x[3]}')
s693835695
p03471
u358051561
1553903849
Python
Python (3.4.3)
py
Runtime Error
17
2940
247
N, Y = map(int, input().split()) li = [[10*a+5*b+(N - a - b), a, b, N- a-b] for a in range(N+1) for b in range(N+1-a) if 10*a+5*b+(N - a - b) == Y//1000] if len(li) == 0: print('-1 -1 -1') else: x = li[0] print(f'{x[1]} {x[2]} {x[3]}')
s750150546
p03471
u358051561
1553903579
Python
Python (3.4.3)
py
Runtime Error
17
2940
298
N, Y = map(int, input().split()) li = [[10*a+5*b+(N - a - b), a, b, N- a-b] for a in range(N+1) for b in range(N+1-a)] hantei = 0 for x in li: if x[0] == Y//1000: print(f'{x[1]} {x[2]} {x[3]}') hantei =1 break else: pass if hantei == 0: print('-1 -1 -1')
s021131780
p03471
u258492760
1553785021
Python
Python (3.4.3)
py
Runtime Error
17
2940
307
n, y = map(int, input().split()) ans = "-1 -1 -1" for n10000 in range(n+1): for n5000 in range(n - n10000 + 1): n1000 = n - n5000 - n10000 money_total = n10000 * 10000 + n5000 * 5000 + n1000 * 1000 if money_total == y: ans = f"{n10000} {n5000} {n1000}" print(ans)
s068793624
p03471
u258492760
1553784927
Python
Python (3.4.3)
py
Runtime Error
17
2940
309
n, y = map(int, input().split()) ans = "-1, -1, -1" for n10000 in range(n+1): for n5000 in range(n - n10000 + 1): n1000 = n - n5000 - n10000 money_total = n10000 * 10000 + n5000 * 5000 + n1000 * 1000 if money_total == y: ans = f"{n10000} {n5000} {n1000}" print(ans)
s651116824
p03471
u258492760
1553783971
Python
Python (3.4.3)
py
Runtime Error
18
2940
297
n, y = map(int, input().split()) ans = "-1, -1, -1" for n10000 in range(n+1): for n5000 in range(n+1): n1000 = n - n5000 - n10000 money_total = n10000 * 10000 + n5000 * 5000 + n1000 * 1000 if money_total == y: ans = f"{n10000} {n5000} {n1000}" print(ans)
s477432496
p03471
u837286475
1553751851
Python
Python (3.4.3)
py
Runtime Error
716
3064
747
n,y = map(int, input().split()) a,b,c = -1,-1,-1 for ai in range(n+1): if ai*1000>y: break # if ai * 1000 == y: # a,b,c = ai,0,0 # break remain = n-ai for bi in range(remain+1): ci = remain - bi if y == ai * 1000 + bi * 5000 + ci * 10000: ...
s102812624
p03471
u837286475
1553751797
Python
Python (3.4.3)
py
Runtime Error
727
3064
760
n,y = map(int, input().split()) a,b,c = -1,-1,-1 for ai in range(n+1): if ai*1000>y: break if ai * 1000 == y: a,b,c = ai,0,0 break remain = n-ai for bi in range(remain+1): ci = remain - bi if y == ai * 1000 + bi * 5000 + ci * 10000: ...
s096506139
p03471
u432333240
1553647524
Python
Python (3.4.3)
py
Runtime Error
18
3064
365
N, Y = map(int, input().split()) man = -1 gosen = -1 sen = -1 flag=0 for i in range(0, N+1): if output_flag==1: break for j in range(0, N+1-i): k = N-i-j total = 10000*i+5000*j+1000*k if total==Y: output_flag=1 man = i gosen = j sen...
s636812731
p03471
u432333240
1553646558
Python
Python (3.4.3)
py
Runtime Error
782
3188
373
N, Y = map(int, input().split()) # i: man, j: gosen, k: sen output_flag=0 for i in range(0, N+1): if output_flag==0: for j in range(0, N+1-i): k = N-i-j if 10000*i+5000*j+1000*k==Y: print(i, j, k) not_output_flag=1 break else: ...
s348813765
p03471
u843135954
1553643130
Python
Python (3.4.3)
py
Runtime Error
17
3064
355
import sys stdin = sys.stdin ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) nn = lambda: list(stdin.readline().split()) ns = lambda: stdin.readline().rstrip() n,y = ni() ans = [-1,-1,-1] for i in range(n+1): for j in range(n-i+1): a = 10000*i + 5000*j + 1000*(n-i-j) if a == y:...
s615426975
p03471
u370331385
1553626660
Python
Python (3.4.3)
py
Runtime Error
17
3064
456
input = sys.stdin.readline N,Y = map(int,input().split()) p = Y//1000 x,y,z = 0,0,0 judge = 0 #0:不可,1:可 #連立方程式 #10000x + 5000y + 1000z = 1000p(Y = 1000p) #x + y + z = N #整数解 x = -4k+p-N , y = 9k-2p+2N, z = N-x-y(k = 0,...2000) if((p-N) >= 0): for k in range((p-N)//4 + 1): x = -4*k+p-N y = 9*k-2*p+2*N z = N-x...
s630669374
p03471
u598720217
1553314659
Python
Python (3.4.3)
py
Runtime Error
17
2940
361
N,Y = map(int, input().split(" ")) f = False t = int(Y/10000) for a in range(t+1): for b in range(N+1): if a+b>N: break c=N-a-b num = a*10000+b*5000+c*1000 if num==Y: print(str(a)+" "+ str(b)+" "+str(c)') f=True break if f: ...
s736927677
p03471
u598720217
1553313875
Python
Python (3.4.3)
py
Runtime Error
17
2940
344
N,Y = map(int, input().split(" ")) f = False t = int(Y/10000) for a in range(t+1): for b in range(N+1): if a+b>N: break c=N-a-b tot = a*10000+b*5000+c*1000 if tot==Y: print(f'{a} {b} {c}') f=True break if f: break if f==Fals...
s570981320
p03471
u598720217
1553313330
Python
Python (3.4.3)
py
Runtime Error
17
3064
350
N,Y = map(int, input().split(" ")) flag = False t = int(Y/10000) for a in range(t+1): for b in range(N+1): if a+b>N: break c=N-(a+b) tot = a*10000+b*5000+c*1000 if tot==Y: flag=True break if flag: break if flag: print(f'{a} {b} {c}'...
s716437571
p03471
u598720217
1553313183
Python
Python (3.4.3)
py
Runtime Error
17
2940
347
N,Y = map(int, input().split(" ")) flag = False t = int(Y/10000) for a in range(t+1): for b in range(N+1): c=N-(a+b) if c<0: break tot = a*10000+b*5000+c*1000 if tot==Y: flag=True break if flag: break if flag: print(f'{a} {b} {c}') ...
s196633122
p03471
u598720217
1553312770
Python
Python (3.4.3)
py
Runtime Error
18
2940
330
N,Y = map(int, input().split(" ")) flag = False for a in range(N+1): for b in range(N+1): c=N-(a+b) if c<0: break tot = a*10000+b*5000+c*1000 if tot==Y: flag=True break if flag: break if flag: print(f'{a} {b} {c}') else: print('...
s002677896
p03471
u555947166
1553224896
Python
Python (3.4.3)
py
Runtime Error
17
2940
234
n, Y = list(map(int, input().split())) for i in range(N + 1): for j in range(n + 1 - i): if 10000 * i + 5000 * j + 1000 * (n - i - j) == Y: print(i, j, n - i - j) exit() else: print('-1 -1 -1')
s097243813
p03471
u555947166
1553224837
Python
Python (3.4.3)
py
Runtime Error
18
2940
234
N, Y = list(map(int, input().split())) for i in range(N + 1): for j in range(n + 1 - i): if 10000 * i + 5000 * j + 1000 * (n - i - j) == Y: print(i, j, n - i - j) exit() else: print('-1 -1 -1')
s250508084
p03471
u548545174
1553196680
Python
Python (3.4.3)
py
Runtime Error
797
3064
486
N, Y = map(int, input().split()) #10000:a, 5000:b, 1000:c for a in range(N+1): for b in range(N+1-a): c = N - a - b if 10000 * a + 5000 * b + 1000 * c == Y: print(a, b, c) exit() print(-1, -1, -1) N, Y = map(int, input().split()) #10000:a, 5000:b, 1000:c for a in range(N+...
s260993403
p03471
u966932195
1552944899
Python
Python (3.4.3)
py
Runtime Error
17
3064
518
N, Y = map(int, input().split()) a_ = Y // 10000 Y2 = Y % 10000 b_ = Y2 // 5000 Y3 = Y2 % 5000 c_ = Y3 // 1000 Y4 = Y3 % 1000 if N < a_+b_+c_: print(-1, -1, -1) exit(1) a = a_ b = b_ c = c_ def check(a, b, c): if N == a+b+c: print(a, b, c) exit(1) for i in range(a_): a = a_ - i b =...
s278721489
p03471
u966932195
1552944827
Python
Python (3.4.3)
py
Runtime Error
18
3064
517
N, Y = map(int, input().split()) a_ = Y // 10000 Y2 = Y % 10000 b_ = Y2 // 5000 Y3 = Y2 % 5000 c_ = Y3 // 1000 Y4 = Y3 % 1000 if N < a_+b_+c_: print(-1, -1, -1) exit(1) a = a_ b = b_ c = c_ def check(a, b, c): if N == a+b+c: print(a, b, c) exit(1) for i in range(a_): a = a_ - i b =...
s316504919
p03471
u966932195
1552944707
Python
Python (3.4.3)
py
Runtime Error
18
3064
518
N, Y = map(int, input().split()) a_ = Y // 10000 Y2 = Y % 10000 b_ = Y2 // 5000 Y3 = Y2 % 5000 c_ = Y3 // 1000 Y4 = Y3 % 1000 if N < a_+b_+c_: print(-1, -1, -1) exit(1) a = a_ b = b_ c = c_ def check(a, b, c): if N == a+b+c: print(a, b, c) exit(1) for i in range(a_): a = a_ - i b =...
s847058749
p03471
u966932195
1552944633
Python
Python (3.4.3)
py
Runtime Error
18
3064
518
N, Y = map(int, input().split()) a_ = Y // 10000 Y2 = Y % 10000 b_ = Y2 // 5000 Y3 = Y2 % 5000 c_ = Y3 // 1000 Y4 = Y3 % 1000 if N < a_+b_+c_: print(-1, -1, -1) exit(1) a = a_ b = b_ c = c_ def check(a, b, c): if N == a+b+c: print(a, b, c) exit(1) for i in range(a_): a = a_ - i b =...
s905976731
p03471
u399967254
1552944425
Python
Python (3.4.3)
py
Runtime Error
18
3064
986
def main(): N,Y = map(int, input().split()) Y /= 1000 candidates = list() sen = 0; gosen = 0; itiman = 0 sen += amari_sen(Y); Y_amari = Y - amari if (Y_amari % 10 == 5): first_sen = sen; first_gosen = gosen+1; first_itiman = itiman second_sen = sen+5; second_gosen = gosen; second_itiman = itiman Y_amari -= ...
s286471234
p03471
u966932195
1552944159
Python
Python (3.4.3)
py
Runtime Error
17
3064
528
N, Y = map(int, input().split()) a_ = Y // 10000 Y2 = Y % 10000 b_ = Y2 // 5000 Y3 = Y2 % 5000 c_ = Y3 // 1000 Y4 = Y3 % 1000 if N < a_+b_+c_: print(-1, -1, -1) f = False def check(a, b, c): if N == a+b+c: print(a, b, c) f = True for i in range(a_): a = a_ - i b = b_ + i * 2 check(...
s966773811
p03471
u399967254
1552944030
Python
Python (3.4.3)
py
Runtime Error
18
3192
986
def main(): N,Y = map(int, input().split()) Y /= 1000 candidates = list() sen = 0; gosen = 0; itiman = 0 sen += amari_sen(Y); Y_amari = Y - amari if (Y_amari % 10 == 5): first_sen = sen; first_gosen = gosen+1; first_itiman = itiman second_sen = sen+5; second_gosen = gosen; second_itiman = itiman Y_amari -= ...
s963130606
p03471
u399967254
1552943751
Python
Python (3.4.3)
py
Runtime Error
17
2940
1091
def main(): N,Y = map(int, input.split()) Y /= 1000 candidates = [] sen = 0; gosen = 0; itiman = 0 sen += amari_sen(Y); Y_amari = Y - amari if (Y_amari % 10 == 5): first_sen = sen; first_gosen = gosen+1; first_itiman = itiman second_sen = sen+5; second_gosen = gosen; second_itiman = itima...
s149707000
p03471
u455177911
1552879273
Python
Python (3.4.3)
py
Runtime Error
17
3064
371
n, Y = [int(s) for s in input().split(' ')] for x in range(n, -1, -1): if Y < x*10000 or n < x: continue for y in range(n-x, -1, -1): if Y < x*10000+y*5000 or n < x+y: continue if (Y-x*10000-y*5000) % 1000 == 0: print('{} {} {}'.format(x, y, z)...
s038378440
p03471
u053009212
1552873642
Python
Python (3.4.3)
py
Runtime Error
17
2940
177
N,Y=input() for x in range(0,N): for y in range(0,N): z=N-x-y if (1000*x+5000*y+10000*z)==Y: print(x,y,z) break if(z==N && 10000*z!=Y ): print("-1 -1 -1")
s800721544
p03471
u897329068
1552494204
Python
Python (3.4.3)
py
Runtime Error
768
2940
203
n,y = map(int,input().split()) for s1 in range(n+1): for s2 in range(n-s1+1): if y== s1*10000+s2*5000+(n-s1-s2)*1000: print("{} {} {}".format(s1,s2,s3)) else: print("{} {} {}".format(-1,-1,-1))
s396194012
p03471
u814663076
1552440059
Python
Python (3.4.3)
py
Runtime Error
2104
3064
460
import sys sys.setrecursionlimit(10**6) def input(): return sys.stdin.readline() def read(): return int(input()) def reads(): return [int(i) for i in input().split()] N, Y = reads() y_max = min(N, Y//10000) i_max = min(N, Y//5000) h_max = min(N, Y//1000) ans = (-1, -1, -1) for y in range(y_max+1): for i in range(i...
s611268862
p03471
u938594975
1552261325
Python
Python (3.4.3)
py
Runtime Error
18
3064
298
inr = lambda: list(map(int, input().split())) N, Y = inr() lmn = [-1, -1, -1] for x in range(N+1): for y in range(N+a): z = N - x - y oto_sum = 10000 * x + 5000 * y + 1000 * z if z > 0 and oto_sum == Y: print(x, y, z) exit() print(-1, -1, -1)
s182531525
p03471
u938594975
1552261224
Python
Python (3.4.3)
py
Runtime Error
20
3064
333
inr = lambda: list(map(int, input().split())) N, Y = inr() lmn = [-1, -1, -1] for x in range(N+1): for y in range(N+a): z = N - x - y oto_sum = 10000 * x + 5000 * y + 1000 * z if z > 0 and oto_sum == Y: lmn[0] = x lmn[1] = y lmn[2] = z print(lmn[0], lm...
s827481614
p03471
u938594975
1552261076
Python
Python (3.4.3)
py
Runtime Error
18
2940
555
inr = lambda: list(map(int, input().split())) N, Y = inr() lmn = [-1, -1, -1] for x in range(N+1): flag = 0 Y_rem = Y - x * 10000 N_rem = N - x if Y_rem >= 0 and N_rem >= 0: flag = 1 if flag = 1: for y in range(N_rem+1): flag_2 = 0 Y_rem_2 = Y_rem - y * ...
s875182481
p03471
u938594975
1552260435
Python
Python (3.4.3)
py
Runtime Error
1897
3064
324
inr = lambda: list(map(int, input().split())) N, Y = inr() lmn = [[-1, -1, -1]] for x in range(N+1): for y in range(N+1): flag = 0 z = N - x - y oto_sum = 10000 * x + 5000 * y + 1000 * z if z >= 0 and Y == oto_sum: lmn.append([x, y, z]) print(lmn[1][0],lmn[1][1],lmn[1]...
s867093640
p03471
u938594975
1552260318
Python
Python (3.4.3)
py
Runtime Error
1721
3064
296
inr = lambda: list(map(int, input().split())) N, Y = inr() lmn = [[-1, -1, -1]] for x in range(N+1): for y in range(N+1): z = N - x - y oto_sum = 10000 * x + 5000 * y + 1000 * z if Y == oto_sum: lmn.append([x, y, z]) print(lmn[1][0],lmn[1][1],lmn[1][2])
s784159133
p03471
u938594975
1552259755
Python
Python (3.4.3)
py
Runtime Error
913
3188
552
inr = lambda: list(map(int, input().split())) N, Y = inr() lmn = [[-1, -1, -1]] for x in range(N+1): flag = 0 Y_rem = Y - x * 10000 N_rem = N - x if Y_rem >= 0 and N_rem >= 0: flag = 1 if flag == 1: for y in range(N_rem+1): flag_2 = 0 Y_rem_2 = Y_rem - y...
s273851435
p03471
u938594975
1552259699
Python
Python (3.4.3)
py
Runtime Error
20
2940
551
inr = lambda: list(map(int, input().split())) N, Y = inr() lmn = [[-1, -1, -1]] for x in range(N+1): flag = 0 Y_rem = Y - x * 10000 N_rem = N - x if Y_rem >= 0 and N_rem >= 0: flag = 1 if flag = 1: for y in range(N_rem+1): flag_2 = 0 Y_rem_2 = Y_rem - y ...
s428959466
p03471
u938594975
1552259410
Python
Python (3.4.3)
py
Runtime Error
757
3064
434
inr = lambda: list(map(int, input().split())) N, Y = inr() lmn = [[-1, -1, -1]] for x in range(N+1): Y_rem = Y - x * 10000 N_rem = N - x if Y_rem >= 0 and N_rem >= 0: for y in range(N_rem+1): Y_rem_2 = Y_rem - y * 5000 z = N_rem - y flag = Y_rem_2 * z ...
s076296963
p03471
u938594975
1552259043
Python
Python (3.4.3)
py
Runtime Error
636
3064
374
inr = lambda: list(map(int, input().split())) N, Y = inr() lmn = [[-1, -1, -1]] for x in range(N+1): Y_rem = Y - x * 10000 N_rem = N - x if Y_rem >= 0: for y in range(N_rem+1): Y_rem_2 = Y_rem - y * 5000 z = N_rem - y if Y_rem_2 == z *1000: lmn....
s396655068
p03471
u938594975
1552258906
Python
Python (3.4.3)
py
Runtime Error
881
3064
408
inr = lambda: list(map(int, input().split())) N, Y = inr() lmn = [[-1, -1, -1]] for x in range(N+1): Y_rem = Y - x * 10000 N_rem = N - x if Y_rem >= 0: for y in range(N_rem+1): Y_rem = Y - x * 10000 - y * 5000 N_rem = N - x - y z = N_rem if Y_re...
s609120273
p03471
u293324662
1551825320
Python
Python (3.4.3)
py
Runtime Error
17
3192
3067
{ "cells": [ { "cell_type": "code", "execution_count": 180, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "1000 1234000\n" ] } ], "source": [ "L=list(map(int,input().split(\" \")))" ] }, { "cell_type": "code", ...
s927755061
p03471
u095426154
1551824463
Python
Python (3.4.3)
py
Runtime Error
17
2940
579
n,m=list(map(int,input().split(" "))) j=0 if n*10000<m or n*1000>m: j=2 for z in range(n+1): for y in range(n+1): for x in range(n+1): ifx*1000+y*5000+z*10000>m: j=2 if x+y+z>n or j==2: break if x+y+z==n: if x*1000+y*500...
s813341487
p03471
u095426154
1551821986
Python
Python (3.4.3)
py
Runtime Error
20
3064
431
x,y,z=0,0,0 j=0 for z in range(n+1): for y in range(n+1): for x in range(n+1): if x+y+z>n: break if x+y+z==n: if x*1000+y*5000+z*10000==m: print(z,y,x) j=1 break if x*1000+y*5000+z*100...
s757087218
p03471
u657913472
1551726089
Python
Python (3.4.3)
py
Runtime Error
17
2940
171
n,y=map(int,input().split()) for a in range(n+1): for b in range(9): c=n-a-b if c>=0 and a*10000+b*5000+c*1000=y: print(a,b,c) exit() print(-1,-1,-1)
s742891430
p03471
u010668949
1551666550
Python
Python (3.4.3)
py
Runtime Error
18
3060
235
N, Y = map(int, input().split()) flag=0 for x in range(N+1): for y in range(N+1): z = N -(x + y) if 0<=z<=N and en_sum==Y: en_sum = 10000*x + 5000*y + 1000*z print(x, y, z) flag+=1 break if flag==0: print(-1, -1, -1)
s871586073
p03471
u235905557
1551559744
Python
Python (3.4.3)
py
Runtime Error
2103
3060
263
N, Y = map(int, input().split()) result = [-1, -1, -1] for a in range(0, N): for b in range(0, N): c = N-(a+b) if 10000*a + 5000*b + 1000*c: result[0] = a result[1] = b result[2] = c print (" ".join(result))
s367270358
p03471
u227170240
1551558630
Python
Python (3.4.3)
py
Runtime Error
1328
3064
565
judge = False N, Y = map(int, input().split()) x = 0 while x <= N and (not judge): y = 0 x += 1 #print('x:' + str(x)) rest = Y - x * 10000 if rest <= 0: if rest == 0 and x == N: judge = True break while x + y <= N and Y - x * 10000 - y * 5000 >= 0: z = (Y - x ...
s815905773
p03471
u815659544
1551218778
Python
Python (3.4.3)
py
Runtime Error
18
3064
426
n, y = map(int, input().split()) def helper(n,y): for ten in range(y,-1,-1): for five in range(y-ten, -1,-1): sum = 10000*ten + 5000*five + 1000*one if n < sum: continue if n == sum: return('{} {} {}'.format(ten,five,n-ten...
s283303756
p03471
u815659544
1551218706
Python
Python (3.4.3)
py
Runtime Error
17
3064
420
n, y = map(int, input().split()) def helper(n,y): for ten in range(y,-1,-1): for five in range(y-ten, -1,-1): sum = 10000*ten + 5000*five + 1000*one if n < sum: continue if n == sum: return('{} {} {}'.format(ten,five,one)...
s414635852
p03471
u815659544
1551218668
Python
Python (3.4.3)
py
Runtime Error
18
3064
419
n, y = map(int(input().split())) def helper(n,y): for ten in range(y,-1,-1): for five in range(y-ten, -1,-1): sum = 10000*ten + 5000*five + 1000*one if n < sum: continue if n == sum: return('{} {} {}'.format(ten,five,one))...
s572074483
p03471
u815659544
1551218631
Python
Python (3.4.3)
py
Runtime Error
18
3064
411
n, y = map(int(input())) def helper(n,y): for ten in range(y,-1,-1): for five in range(y-ten, -1,-1): sum = 10000*ten + 5000*five + 1000*one if n < sum: continue if n == sum: return('{} {} {}'.format(ten,five,one)) ...
s239325645
p03471
u119983020
1550871215
Python
Python (3.4.3)
py
Runtime Error
1256
2940
214
N, Y = map(int,input().split()) for i in range(N+1): for j in range(N+1): if Y == 10000*i + 5000*j + 1000*(N-i-j): print(i," ",j," ",k) break else: continue break else: print("-1 -1 -1")
s753584522
p03471
u598720217
1550727025
Python
Python (3.4.3)
py
Runtime Error
18
3068
409
N,Y = map(int,input().split(" ")) t = int(Y/10000) end=False for x in range(1,t+1): for y in range(1,20001): for z in range(1,20001): ans = x*10000+y*5000+z*1000 if ans==Y and x+y+z==N: print(str(x)+" "+str(y)+" "+str(z)) end=True break ...
s821569475
p03471
u985376351
1549228471
Python
Python (3.4.3)
py
Runtime Error
527
3056
256
n, y = map(int,input().split()) def f(n,y): for i in range(n): for j in range(n-i): s = 10000*i + 5000*j + 1000*(n-i-j) if s == y: return '{0} {1} {2}'.format(i,j,k) return '-1 -1 -1' print(f(n,y))
s151162076
p03471
u985376351
1549228320
Python
Python (3.4.3)
py
Runtime Error
531
3060
240
n, y = map(int,input().split()) def f(n,y): for i in range(n): for j in range(n-i): s = 10000*i + 5000*j + 1000*(n-i-j) if s == y: return [i, j, k] return [-1, -1, -1] print(f(n,y))
s095302065
p03471
u219607170
1548566273
Python
PyPy3 (2.4.0)
py
Runtime Error
452
114652
533
N, Y = map(int, input().split()) def res(a, b, c, A, memo): if memo[a][b]: return None else: memo[a][b] = True if c < 0: return None if a+b+c == N: A.append([a, b, c]) return None if a+b+c < N: return None res(a+1, b, c-10, A, memo) res(a, b+1...
s202717742
p03471
u219607170
1548566211
Python
Python (3.4.3)
py
Runtime Error
507
70408
533
N, Y = map(int, input().split()) def res(a, b, c, A, memo): if memo[a][b]: return None else: memo[a][b] = True if c < 0: return None if a+b+c == N: A.append([a, b, c]) return None if a+b+c < N: return None res(a+1, b, c-10, A, memo) res(a, b+1...
s454346908
p03471
u977389981
1548431993
Python
Python (3.4.3)
py
Runtime Error
18
3064
368
n, y = map(int, input().split()) s = min(n, y // 10000) t = min(n, y // 5000) u = min(n, y // 1000) ans =[-1, -1, -1] for i in range(s, -1, -1): for j in range(t, -1, -1): for u in range(u, -1, -1): if i * 10000 + j * 5000 + k * 1000 == y and i + j + k == n: ans = [i, j, k] ...
s893899769
p03471
u063550014
1548201462
Python
Python (3.4.3)
py
Runtime Error
18
2940
470
count,total = list(map(int,input().split())) ret1 = -1 ret2 = -1 ret3 = -1 NF = True if total <= count * 10000: for i in range(count + 1): rCount = count - i if total-10000*i <= rCount * 5000: for j in range(rCount + 1): if (i*10000 + j*5000 + (count-i-j)*1000) == total: ret1 = i ret2 = j ret...
s938413879
p03471
u040168862
1548127789
Python
Python (3.4.3)
py
Runtime Error
18
3192
1040
from typing import * def main(N,Y): # type: (int, int) -> None """ 次の方程式 x + y + z = N 10x + 5y + z = Y の解を探索する.zを消去すると 9x + 4y = Y - N where x >= 0 y >= 0 x + y <= N w = 2x+y と置くと x + 4w = Y - N where x >= 0 w >= 0...
s412737314
p03471
u040168862
1548127109
Python
Python (3.4.3)
py
Runtime Error
18
3064
1014
def main(N,Y): # type: (int, int) -> None """ 次の方程式 x + y + z = N 10x + 5y + z = Y の解を探索する.zを消去すると 9x + 4y = Y - N where x >= 0 y >= 0 x + y <= N w = 2x+y と置くと x + 4w = Y - N where x >= 0 w >= 0 w - x <= Y ...
s065895567
p03471
u102960641
1547941301
Python
Python (3.4.3)
py
Runtime Error
17
3060
200
n, y = map(int, input().split()) for i in range(0, n+1): for j in range(0, n+1-a): k = n - i - j if 10000 * i + 5000 * j + 1000 * k == y: print(i, j, k) exit() print(-1, -1, -1)
s201925826
p03471
u572271833
1547851054
Python
Python (3.4.3)
py
Runtime Error
18
2940
348
n,y=map(int,input().split( )) flag=True n,y=map(int,input().split( )) flag=True for i in range(n+1): for j in range(n-i+1): x=y-10000*i-5000*j if x/1000 == n-i-j: flag = False print(str(i)+' '+str(j)+' '+str(n-i-j-2)) break if not flag: break if...
s322216012
p03471
u785578220
1547752976
Python
Python (3.4.3)
py
Runtime Error
18
3064
171
a,b = ma() c=d=e=-1 b=b//1000 for i in range(a): for j in range(a-i): if b == i*10 + j*5 + (a-i-j): c,d,e=i,j,a-i-j break print(c,d,e)
s161117287
p03471
u879870653
1547676674
Python
Python (3.4.3)
py
Runtime Error
724
3060
244
N,Y = map(int,input().split()) ans = [-1,-1,-1] for x in range(N+1) : man = x * 10000 for y in range(N+1-x) : gosen = y * 5000 sen = (N-x-y) * 1000 if (man+gosen+sen) == Y : ans = [x,y,z] print(*ans)
s659275321
p03471
u899395423
1547062707
Python
Python (3.4.3)
py
Runtime Error
18
2940
415
import numpy as np n, y = np.array(list(input().split()), dtype=int) vals = np.array([10000, 5000, 1000]) def get_tuple(n, y): for c in range(n + 1): for b in range(n + 1 - c): a = n - c - b nums = np.array([a, b, c]) yield nums for nums in get_tuple(n, y): if nums...
s460695086
p03471
u010668949
1546459849
Python
Python (3.4.3)
py
Runtime Error
18
3064
683
#入力 N = int(input()) Y = int(input()) #一万円の枚数を算出 if int(Y/10000)>0: x = int(Y/10000) else: x = 0 #五千円の枚数を算出 #お年玉から万の位を除いた値 under_tenthousand = Y-x*10000 if int(under_tenthousand/5000)>0: y = int(under_tenthousand/5000) else: y = 0 #千円の枚数を算出 #この時点でお年玉は五千円未満となっている under_...
s222308556
p03471
u853900545
1546371372
Python
Python (3.4.3)
py
Runtime Error
18
3060
204
n,y = map(int,input().split()) y //= 1000 a,b,c = 0,0,0 for i in range(n): for j in range(n-j): if 10*i + 5*j + (n-i-j) == y: print(i,j,n-i-j) exit() print('-1 -1 -1')
s089190391
p03471
u330039499
1545973803
Python
Python (2.7.6)
py
Runtime Error
11
2568
247
import sys< N, Y = map(int, raw_input().split())< for i in range(N + 1):< for j in range(N + 1 - i):< k = N - i - j< if i * 10000 + j * 5000 + k * 1000 == Y: print i, j, k< sys.exit()< print "-1 -1 -1"<
s548570509
p03471
u464995425
1545366626
Python
Python (3.4.3)
py
Runtime Error
18
2940
248
import sys n,y = map(int, input().split()) for a in range(n+1): for b in range(n+1-a): c = n - a - b if a * 10000 + b * 5000 + c * 1000 == y: print(str(a) + ' ' + str(b) + ' ' + str(c)) sys.exit() print('-1 -1 -1') sys.exit()
s130840966
p03471
u464995425
1545366503
Python
Python (3.4.3)
py
Runtime Error
17
2940
249
import sys n,y = map(int, input().split()) for a in range(n+1): for b in range(n+1-a): c = n - a - b if (a * 10000 + b * 5000 + c * 1000 == y): print(str(a) + ' ' + str(b) + ' ' + str(c)) sys.exit() print('-1 -1 -1') sys.exit()
s190522788
p03471
u464995425
1545366061
Python
Python (3.4.3)
py
Runtime Error
18
2940
201
import sys n,y = map(int, input().split()) for a in range(n+1): for b in range(n+1-a): if (a * 10000 + b * 5000 + (n-a-b) * 1000 == y): print(a) sys.exit() print('-1 -1 -1') sys.exit()
s668023948
p03471
u464995425
1545365995
Python
Python (3.4.3)
py
Runtime Error
18
2940
199
import sys n,y = map(int, input().split()) for a in range(n+1): for b in range(n+1-a): if a * 10000 + b * 5000 + (n-a-b) * 1000 == y: print(a) sys.exit() print('-1 -1 -1') sys.exit()
s949459114
p03471
u464995425
1545365627
Python
Python (3.4.3)
py
Runtime Error
18
2940
234
import sys n,y = map(int, input().split()) for a in range(n+1): for b in range(n+1-a): if a * 10000 + b * 5000 + (n-a-b) * 1000 == y: print(str(a) + ' ' + str(b) + ' ' + str(c)) sys.exit() print('-1 -1 -1') sys.exit()
s107672363
p03471
u464995425
1545365570
Python
Python (3.4.3)
py
Runtime Error
768
3060
235
import sys n,y = map(int, input().split()) for a in range(n+1): for b in range(n+1-a): if a * 10000 + b * 5000 + (n-a-b) * 1000 == y: print(str(a) + ' ' + str(b) + ' ' + str(c)) # sys.exit() print('-1 -1 -1') sys.exit()
s973865793
p03471
u464995425
1545365367
Python
Python (3.4.3)
py
Runtime Error
18
2940
256
import sys n,y = map(int, input().split()) n = n+1 y = y+1 for a in range(n+1): # for b in range(n+1-a): b = 1 if a * 10000 + b * 5000 + (n-a-b) * 1000 == y: print(str(a) + ' ' + str(b) + ' ' + str(c)) sys.exit() print('-1 -1 -1') sys.exit()
s644719215
p03471
u464995425
1545365071
Python
Python (3.4.3)
py
Runtime Error
17
3064
229
import sys n,y = map(int, input().split()) for a in range(n+1): for b in range(n+1-a): if a * 10000 + b * 5000 + (n-a-b) * 1000 == y: print(str(a) + ' ' + str(b) + ' ' + str(c)) sys.exit() print('-1 -1 -1') sys.exit()
s002493854
p03471
u464995425
1545364363
Python
Python (3.4.3)
py
Runtime Error
18
2940
232
import sys n,y = map(int, input().split()) for a in range(n+1): for b in range(n+1-a): # if (a * 10000 + b * 5000 + (n-a-b) * 1000 == y): # print(str(a) + ' ' + str(b) + ' ' + str(c)) # sys.exit() print('-1 -1 -1') sys.exit()
s104396694
p03471
u464995425
1545364300
Python
Python (3.4.3)
py
Runtime Error
18
3060
230
import sys n,y = map(int, input().split()) for a in range(n+1): for b in range(n+1-a): # if (a * 10000 + b * 5000 + (n-a-b) * 1000 == y): print(str(a) + ' ' + str(b) + ' ' + str(c)) sys.exit() print('-1 -1 -1') sys.exit()
s590078339
p03471
u464995425
1545364171
Python
Python (3.4.3)
py
Runtime Error
18
2940
229
import sys n,y = map(int, input().split()) for a in range(n+1): for b in range(n+1-a): if (a * 10000 + b * 5000 + (n-a-b) * 1000 == y): print(str(a) + ' ' + str(b) + ' ' + str(c)) sys.exit() print('-1 -1 -1') sys.exit()
s547234662
p03471
u464995425
1545363927
Python
Python (3.4.3)
py
Runtime Error
18
2940
227
import sys n,y = map(int, input().split()) for a in range(n+1): for b in range(n+1-a): if a * 10000 + b * 5000 + (n-a-b) * 1000 == y: print(str(a) + ' ' + str(b) + ' ' + str(c)) sys.exit() print('-1 -1 -1') sys.exit()
s038854418
p03471
u464995425
1545363809
Python
Python (3.4.3)
py
Runtime Error
19
2940
229
import sys n,y = map(int, input().split()) for a in range(n+1): for b in range(n+1-a): if (a * 10000 + b * 5000 + (n-a-b) * 1000 == y): print(str(a) + ' ' + str(b) + ' ' + str(c)) sys.exit() print('-1 -1 -1') sys.exit()
s581164687
p03471
u464995425
1545363686
Python
Python (3.4.3)
py
Runtime Error
17
2940
227
import sys n,y = map(int, input().split()) for a in range(n+1): for b in range(n+1): if (a * 10000 + b * 5000 + (n-a-b) * 1000 == y): print(str(a) + ' ' + str(b) + ' ' + str(c)) sys.exit() print('-1 -1 -1') sys.exit()
s291149642
p03471
u464995425
1545363553
Python
Python (3.4.3)
py
Runtime Error
18
2940
218
import sys n,y = map(int, input().split()) for a in range(n+1): for b in range(n+1-a): if (a * 10000 + b * 5000 + (n-a-b) * 1000 == y): print(str(a) + ' ' + str(b) + ' ' + str(c)) sys.exit() print('-1 -1 -1')
s361967546
p03471
u464995425
1545363453
Python
Python (3.4.3)
py
Runtime Error
719
3060
233
import sys n,y = map(int, input().split()) for a in range(n+1): for b in range(n+1-a): if (a * 10000 + b * 5000 + (n-a-b) * 1000 == y): print(str(a) + ' ' + str(b) + ' ' + str(c)) sys.exit() print('-1 -1 -1') sys.exit()
s947507193
p03471
u464995425
1545357264
Python
Python (3.4.3)
py
Runtime Error
1405
3060
231
import sys n,y = map(int, input().split()) for a in range(n+1): for b in range(n+1): if (a * 10000 + b * 5000 + (n-a-b) * 1000 == y): print(str(a) + ' ' + str(b) + ' ' + str(c)) sys.exit() print('-1 -1 -1') sys.exit()
s202126083
p03471
u464995425
1545356795
Python
Python (3.4.3)
py
Runtime Error
1313
3316
230
import sys n,y= map(int, input().split()) for a in range(n+1): for b in range(n+1): if (a * 10000 + b * 5000 + (n-a-b) * 1000 == y): print(str(a) + ' ' + str(b) + ' ' + str(c)) sys.exit() print('-1 -1 -1') sys.exit()
s816968176
p03471
u464995425
1545354324
Python
Python (3.4.3)
py
Runtime Error
18
2940
375
import sys n, y = input().split() n = int(n) y = int(y) for a in range(n+1): for b in range(n+1): for c in range(n+1): if a + b + c < n: continue if a + b + c > n: break if (a + b + c == n) and (a * 10000 + b * 5000 + c * 1000 == y): print(str(a) + ' ' + s...
s200706735
p03471
u464995425
1545354152
Python
Python (3.4.3)
py
Runtime Error
18
2940
381
import sys n, y = input().split() n = int(n) y = int(y) for a in range(n+1): for b in range(n+1-a): for c in range(n+1-a-b): if a + b + c < n: continue if a + b + c > n: break if (a + b + c == n) and (a * 10000 + b * 5000 + c * 1000 == y): print(str(a) + '...
s589495332
p03471
u464995425
1545346926
Python
Python (3.4.3)
py
Runtime Error
2104
3060
240
import sys n, y = input().split() n = int(n) y = int(y) for a in range(n+1): for b in range(n+1-a): for c in range(n+1-a-b): if a * 10000 + b * 5000 + c * 1000 == y: print(a + ' ' + b + ' ' + c) sys.exit() print('-1 -1 -1')
s360904161
p03471
u492605584
1545154577
Python
Python (3.4.3)
py
Runtime Error
18
3060
216
import itertools L = input() s = ['+','-'] t = ['+','-'] u = ['+','-'] for a, b, c in itertools.product(s, t, u): f = L[0] + a + L[1] + b + L[2] + c + L[3] if eval(f) == 7: print(f+'=7') exit(0)