Submission #1990119


Source Code Expand

import numpy as np

import itertools

import math 
from collections import defaultdict as dd
def main():
    N, Y = map(int, input().split())
    a = int(Y/10000)

    if a*10000 == Y:
        print (a,0,0)
        return

    s = -1
    for k in range(a+1):
        b = N-k
        if b >= 0:
            for j in range(b+1):
                s = 10000*k+5000*j+1000*(b-j)
                if s == Y:
                    print (k,j,(b-j))
                    return

    if s != Y:
        print ('-1 -1 -1')



if __name__ == "__main__":
    # global stime
    # stime = time.clock()
    main()

Submission Info

Submission Time
Task A - Already 2018
User toshh
Language Python (3.4.3)
Score 0
Code Size 628 Byte
Status RE
Exec Time 149 ms
Memory 12472 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 100
Status
RE × 2
RE × 8
Set Name Test Cases
Sample a01, a02
All a01, a02, b03, b04, b05, b06, b07, b08
Case Name Status Exec Time Memory
a01 RE 149 ms 12468 KB
a02 RE 149 ms 12472 KB
b03 RE 149 ms 12468 KB
b04 RE 149 ms 12472 KB
b05 RE 149 ms 12472 KB
b06 RE 149 ms 12468 KB
b07 RE 149 ms 12472 KB
b08 RE 149 ms 12472 KB