Submission #4678018


Source Code Expand

n,y=(int(i) for i in input().split())
dd = []
for a in range(n + 1):
    for b in range(n - a + 1):
        c = n -a -b 
        dd.append((a,b,c))
        
ans = (-1,-1,-1)
for d in dd:
    if d[0]* 1000 + d[1]* 5000 + d[2]* 10000 == y:
        ans=d
        break
print("%d %d %d"%ans)

Submission Info

Submission Time
Task C - Otoshidama
User vandeeglobe
Language Python (3.4.3)
Score 0
Code Size 301 Byte
Status WA
Exec Time 1485 ms
Memory 258460 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 2
WA × 1
MLE × 1
AC × 6
WA × 10
MLE × 8
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 AC 18 ms 2940 KB
a02 AC 19 ms 3060 KB
a03 WA 369 ms 60492 KB
a04 MLE 849 ms 258460 KB
b05 WA 18 ms 2940 KB
b06 AC 18 ms 2940 KB
b07 WA 18 ms 3060 KB
b08 MLE 1459 ms 258460 KB
b09 MLE 923 ms 258216 KB
b10 MLE 1485 ms 258460 KB
b11 MLE 1435 ms 258216 KB
b12 MLE 1415 ms 256568 KB
b13 WA 1285 ms 235364 KB
b14 WA 1373 ms 248040 KB
b15 MLE 839 ms 253952 KB
b16 WA 785 ms 236880 KB
b17 WA 792 ms 241772 KB
b18 WA 18 ms 2940 KB
b19 WA 24 ms 3956 KB
b20 WA 1059 ms 252352 KB
b21 MLE 1415 ms 256084 KB
b22 AC 1324 ms 243892 KB
b23 AC 1391 ms 247792 KB
b24 AC 1351 ms 236296 KB