Submission #7015439


Source Code Expand

import sys
N, Y = map(int,input().split())

for x in range(N+1):
	for y in range(N+1-x):
		if 0 <= (Y - 10000*x - 5000*y) // 1000 <= N-x-y:
			z = (Y - 10000*x - 5000*y) // 1000
			print(x,y,z,sep = " ")
			sys.exit()

print("-1 -1 -1")

Submission Info

Submission Time
Task C - Otoshidama
User SUS_MATA
Language Python (3.4.3)
Score 0
Code Size 246 Byte
Status WA
Exec Time 726 ms
Memory 3060 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 3
WA × 1
AC × 18
WA × 6
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 3060 KB
a02 AC 17 ms 3060 KB
a03 WA 17 ms 3060 KB
a04 AC 619 ms 2940 KB
b05 AC 17 ms 2940 KB
b06 AC 17 ms 3060 KB
b07 AC 17 ms 2940 KB
b08 AC 17 ms 3060 KB
b09 AC 608 ms 2940 KB
b10 WA 17 ms 3060 KB
b11 AC 618 ms 2940 KB
b12 AC 17 ms 2940 KB
b13 WA 17 ms 2940 KB
b14 WA 17 ms 2940 KB
b15 AC 669 ms 2940 KB
b16 AC 574 ms 3060 KB
b17 AC 576 ms 3060 KB
b18 AC 17 ms 2940 KB
b19 AC 20 ms 3060 KB
b20 AC 17 ms 3060 KB
b21 WA 17 ms 2936 KB
b22 WA 17 ms 2940 KB
b23 AC 726 ms 3060 KB
b24 AC 623 ms 2940 KB