Submission #4678052


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]* 10 + d[1]* 5 + d[2] == y/1000:
        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 286 Byte
Status MLE
Exec Time 1740 ms
Memory 258504 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 3
MLE × 1
AC × 16
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 17 ms 2940 KB
a02 AC 17 ms 3060 KB
a03 AC 207 ms 60492 KB
a04 MLE 1543 ms 258456 KB
b05 AC 17 ms 3060 KB
b06 AC 17 ms 2940 KB
b07 AC 17 ms 3060 KB
b08 MLE 801 ms 258504 KB
b09 MLE 1575 ms 258220 KB
b10 MLE 1566 ms 258456 KB
b11 MLE 1514 ms 258220 KB
b12 MLE 798 ms 256568 KB
b13 AC 746 ms 235372 KB
b14 AC 872 ms 248044 KB
b15 MLE 1613 ms 253936 KB
b16 AC 1464 ms 236872 KB
b17 AC 1420 ms 241904 KB
b18 AC 17 ms 3060 KB
b19 AC 26 ms 3956 KB
b20 AC 766 ms 252344 KB
b21 MLE 1740 ms 256072 KB
b22 AC 1454 ms 243916 KB
b23 AC 1448 ms 247788 KB
b24 AC 1411 ms 236296 KB