Submission #4659437


Source Code Expand

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==False:
    print('-1 -1 -1')

Submission Info

Submission Time
Task C - Otoshidama
User osushi5
Language Python (3.4.3)
Score 0
Code Size 360 Byte
Status RE
Exec Time 17 ms
Memory 2940 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
RE × 4
RE × 24
Set Name Test Cases
Sample a01, a02, a03, a04
All a01, a02, a03, a04, b05, b06, b07, b08, b09, b10, b11, b12, b13, b14, b15, b16, b17, b18, b19, b20, b21, b22, b23, b24
Case Name Status Exec Time Memory
a01 RE 17 ms 2940 KB
a02 RE 17 ms 2940 KB
a03 RE 17 ms 2940 KB
a04 RE 17 ms 2940 KB
b05 RE 17 ms 2940 KB
b06 RE 17 ms 2940 KB
b07 RE 17 ms 2940 KB
b08 RE 17 ms 2940 KB
b09 RE 17 ms 2940 KB
b10 RE 17 ms 2940 KB
b11 RE 17 ms 2940 KB
b12 RE 17 ms 2940 KB
b13 RE 17 ms 2940 KB
b14 RE 17 ms 2940 KB
b15 RE 17 ms 2940 KB
b16 RE 17 ms 2940 KB
b17 RE 17 ms 2940 KB
b18 RE 17 ms 2936 KB
b19 RE 17 ms 2940 KB
b20 RE 17 ms 2940 KB
b21 RE 17 ms 2940 KB
b22 RE 17 ms 2940 KB
b23 RE 17 ms 2940 KB
b24 RE 17 ms 2940 KB