Submission #4082262


Source Code Expand

n, y = map(int, input().split())

ans =[-1, -1, -1]
for i in range(n + 1):
    for j in range(n + 1 - i):
        for k in range(n + 1 - i - j):
            if i * 10000 + j * 5000 + k * 1000 == y and i + j + k == n:
                ans = [i, j, k]
                break
print(' '.join(map(str, ans)))

Submission Info

Submission Time
Task C - Otoshidama
User Asymmetry
Language Python (3.4.3)
Score 0
Code Size 310 Byte
Status TLE
Exec Time 2104 ms
Memory 3060 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 2
TLE × 2
AC × 7
TLE × 17
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 3060 KB
a02 AC 19 ms 3060 KB
a03 TLE 2104 ms 2936 KB
a04 TLE 2104 ms 2940 KB
b05 AC 18 ms 3060 KB
b06 AC 18 ms 3060 KB
b07 AC 18 ms 2940 KB
b08 TLE 2104 ms 3060 KB
b09 TLE 2104 ms 3060 KB
b10 TLE 2104 ms 2940 KB
b11 TLE 2104 ms 2940 KB
b12 TLE 2104 ms 2940 KB
b13 TLE 2104 ms 2940 KB
b14 TLE 2104 ms 3060 KB
b15 TLE 2104 ms 2940 KB
b16 TLE 2104 ms 2940 KB
b17 TLE 2104 ms 2940 KB
b18 AC 18 ms 3060 KB
b19 AC 171 ms 3060 KB
b20 TLE 2104 ms 3060 KB
b21 TLE 2104 ms 2940 KB
b22 TLE 2104 ms 2940 KB
b23 TLE 2104 ms 3060 KB
b24 TLE 2104 ms 2940 KB