Submission #3019554
Source Code Expand
a = int(input()) b = int(input()) c = int(input()) x = int(input()) times = 0 stockA = a for i in range(a+1): chk = 0 if x <= 500*stockA: maxA = x//500 totalX = x%500 else: maxA = stockA totalX = x - 500*stockA stockB = b for j in range(b+1): if totalX <= 100*stockB: sampleB = totalX//100 totalX2 = totalX%100 else: sampleB = stockB totalX2 = totalX - 100*stockB if totalX2 <= 50*c: chk = 1 times += 1 else: break if sampleB == 0: break stockB = sampleB - 1 if chk == 0: break if maxA == 0: break stockA = maxA - 1 print(times)
Submission Info
Submission Time | |
---|---|
Task | ABC087B - Coins |
User | fuukhndi |
Language | Python (3.4.3) |
Score | 200 |
Code Size | 795 Byte |
Status | AC |
Exec Time | 17 ms |
Memory | 3064 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample01.txt, sample02.txt, sample03.txt |
All | 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 | AC | 17 ms | 3064 KB |
02.txt | AC | 17 ms | 3064 KB |
03.txt | AC | 17 ms | 3064 KB |
04.txt | AC | 17 ms | 3064 KB |
05.txt | AC | 17 ms | 3064 KB |
06.txt | AC | 17 ms | 3064 KB |
07.txt | AC | 17 ms | 3064 KB |
08.txt | AC | 17 ms | 3064 KB |
09.txt | AC | 17 ms | 3064 KB |
10.txt | AC | 17 ms | 3064 KB |
sample01.txt | AC | 17 ms | 3064 KB |
sample02.txt | AC | 17 ms | 3064 KB |
sample03.txt | AC | 17 ms | 3064 KB |