Submission #2545581
Source Code Expand
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); int X = sc.nextInt(); int result = 0; int count = 0; for(int i = 0; i <= A; i++) { for(int j = 0; j <= B; j++) { for(int k = 0; k <= C; k++){ result = (500 * i) + (100 * j) + (50 * k); if(result == X) { count++; } } } } System.out.println(count); } }
Submission Info
Submission Time | |
---|---|
Task | B - Coins |
User | yoshitaka |
Language | Java8 (OpenJDK 1.8.0) |
Score | 200 |
Code Size | 533 Byte |
Status | AC |
Exec Time | 106 ms |
Memory | 23636 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 | 94 ms | 18644 KB |
02.txt | AC | 93 ms | 21588 KB |
03.txt | AC | 94 ms | 19156 KB |
04.txt | AC | 97 ms | 21076 KB |
05.txt | AC | 94 ms | 20564 KB |
06.txt | AC | 94 ms | 19924 KB |
07.txt | AC | 96 ms | 19796 KB |
08.txt | AC | 93 ms | 23636 KB |
09.txt | AC | 93 ms | 18900 KB |
10.txt | AC | 95 ms | 19924 KB |
sample01.txt | AC | 92 ms | 18768 KB |
sample02.txt | AC | 94 ms | 20688 KB |
sample03.txt | AC | 106 ms | 19412 KB |