Submission #4667866


Source Code Expand

#085-C
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return list(input())
n,y=IL()
f=True
for i in range(n+1):
    for j in range(n+1):
        if n-i-j>=0:
            if (10*i+5*j+(n-i-j))*1000==y:
                if f:
                    print(i,j,n-i-j)
                    f=False
if f:
    print(-1,-1,-1)

Submission Info

Submission Time
Task C - Otoshidama
User IdealLife3
Language Python (3.4.3)
Score 300
Code Size 400 Byte
Status AC
Exec Time 1229 ms
Memory 3064 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 4
AC × 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 AC 17 ms 3064 KB
a02 AC 18 ms 3064 KB
a03 AC 288 ms 3064 KB
a04 AC 1069 ms 3064 KB
b05 AC 18 ms 3064 KB
b06 AC 18 ms 3060 KB
b07 AC 18 ms 3064 KB
b08 AC 1229 ms 3064 KB
b09 AC 1083 ms 3064 KB
b10 AC 1097 ms 3064 KB
b11 AC 1082 ms 3064 KB
b12 AC 1057 ms 3060 KB
b13 AC 970 ms 3064 KB
b14 AC 1042 ms 3060 KB
b15 AC 1132 ms 3060 KB
b16 AC 1097 ms 3064 KB
b17 AC 1168 ms 3064 KB
b18 AC 18 ms 3064 KB
b19 AC 24 ms 3064 KB
b20 AC 1045 ms 3060 KB
b21 AC 1062 ms 3064 KB
b22 AC 1203 ms 3064 KB
b23 AC 1018 ms 3064 KB
b24 AC 984 ms 3064 KB