Submission #5993815


Source Code Expand

Copy
def main():
    A = int(input())
    B = int(input())
    C = int(input())
    X = int(input())

    count =0

    for i in range(A+1):
        for j in range(B+1):
            x =X -500*i -100*j
            if x < 0:
                break
            elif x ==0:
                count +=1
                break
            elif (x // 50) <= C:
                count +=1
                continue
    print(count)
    
if __name__ == "__main__":
    main()

Submission Info

Submission Time
Task ABC087B - Coins
User vll
Language Python3 (3.4.3)
Score 200
Code Size 477 Byte
Status
Exec Time 17 ms
Memory 3064 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample01.txt, sample02.txt, sample03.txt
All 200 / 200 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, sample01.txt, sample02.txt, sample03.txt
Case Name Status Exec Time Memory
01.txt 17 ms 3060 KB
02.txt 17 ms 2940 KB
03.txt 17 ms 3060 KB
04.txt 17 ms 3060 KB
05.txt 17 ms 3060 KB
06.txt 17 ms 3064 KB
07.txt 17 ms 3060 KB
08.txt 17 ms 3060 KB
09.txt 17 ms 3060 KB
10.txt 17 ms 2940 KB
sample01.txt 17 ms 2940 KB
sample02.txt 17 ms 2940 KB
sample03.txt 17 ms 3060 KB