Submission #3026455
Source Code Expand
import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner scanner = new Scanner(System.in); int A = scanner.nextInt(); int B = scanner.nextInt(); int C = scanner.nextInt(); int X = scanner.nextInt(); int counter = 0; for( int i = 0; i <= A; i++ ) { for( int j = 0; j <= B; j++ ) { for( int k = 0; k <= C; k++ ) { if( 500 * i + 100 * j + 50 * k == X ) { counter++; } } } } System.out.println(counter); scanner.close(); } }
Submission Info
Submission Time | |
---|---|
Task | B - Coins |
User | silviase |
Language | Java8 (OpenJDK 1.8.0) |
Score | 200 |
Code Size | 670 Byte |
Status | AC |
Exec Time | 107 ms |
Memory | 21716 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 | 19156 KB |
02.txt | AC | 91 ms | 20692 KB |
03.txt | AC | 92 ms | 21716 KB |
04.txt | AC | 105 ms | 19668 KB |
05.txt | AC | 91 ms | 19668 KB |
06.txt | AC | 94 ms | 21076 KB |
07.txt | AC | 95 ms | 20692 KB |
08.txt | AC | 92 ms | 19540 KB |
09.txt | AC | 92 ms | 19668 KB |
10.txt | AC | 93 ms | 21716 KB |
sample01.txt | AC | 91 ms | 19924 KB |
sample02.txt | AC | 93 ms | 21588 KB |
sample03.txt | AC | 107 ms | 19156 KB |