Submission #1949078


Source Code Expand

N,Y = map(int,input().split(" "))


for i in range(N,-1,-1):
	for j in range(N-i,-1,-1):
			num = (10000*i+5000*j+1000*(N-i-j))
			if num == Y:
				print(str(i) + " " + str(j) + " " + str(N-i-j))
				exit(0)

print("-1 -1 -1")

Submission Info

Submission Time
Task C - Otoshidama
User banboooo044
Language Python (3.4.3)
Score 300
Code Size 236 Byte
Status AC
Exec Time 889 ms
Memory 3188 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 18 ms 3060 KB
a02 AC 21 ms 3188 KB
a03 AC 197 ms 3060 KB
a04 AC 18 ms 3064 KB
b05 AC 18 ms 3064 KB
b06 AC 18 ms 3060 KB
b07 AC 19 ms 3064 KB
b08 AC 747 ms 3188 KB
b09 AC 18 ms 2940 KB
b10 AC 889 ms 2940 KB
b11 AC 746 ms 3064 KB
b12 AC 767 ms 3060 KB
b13 AC 710 ms 3060 KB
b14 AC 838 ms 3060 KB
b15 AC 18 ms 3060 KB
b16 AC 19 ms 3064 KB
b17 AC 18 ms 3060 KB
b18 AC 18 ms 2940 KB
b19 AC 18 ms 3060 KB
b20 AC 350 ms 3060 KB
b21 AC 723 ms 3060 KB
b22 AC 694 ms 3064 KB
b23 AC 767 ms 3060 KB
b24 AC 673 ms 3064 KB