Submission #2857803


Source Code Expand

N, Y = list(map(lambda x: int(x), input().split(" ")))

flag = False
ans = []
for a in range(2001):
  for b in range(2001):
    if 9000 * a + 4000 * b == (Y - 1000 * N) and a + b < N:
      flag = True
      ans.append((a, b, (N-a-b)))

if len(ans) == 0:
  print("-1 -1 -1")
else:
  print("{} {} {}".format(ans[0][0], ans[0][1], ans[0][2]))

Submission Info

Submission Time
Task C - Otoshidama
User macaco1101
Language Python (3.4.3)
Score 0
Code Size 353 Byte
Status WA
Exec Time 1052 ms
Memory 3064 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 3
WA × 1
AC × 20
WA × 4
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 971 ms 3060 KB
a02 AC 1012 ms 3060 KB
a03 AC 974 ms 3060 KB
a04 WA 1014 ms 3060 KB
b05 AC 949 ms 3060 KB
b06 WA 1003 ms 3060 KB
b07 WA 977 ms 3060 KB
b08 AC 1052 ms 3060 KB
b09 WA 979 ms 3060 KB
b10 AC 964 ms 3064 KB
b11 AC 972 ms 3060 KB
b12 AC 1013 ms 3060 KB
b13 AC 1009 ms 3060 KB
b14 AC 984 ms 2940 KB
b15 AC 983 ms 3064 KB
b16 AC 977 ms 3064 KB
b17 AC 1032 ms 3060 KB
b18 AC 1022 ms 3064 KB
b19 AC 989 ms 2940 KB
b20 AC 1002 ms 3060 KB
b21 AC 981 ms 3060 KB
b22 AC 1004 ms 3064 KB
b23 AC 1009 ms 3060 KB
b24 AC 987 ms 3060 KB