Submission #2387524
Source Code Expand
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); // 参加人数 int participant = sc.nextInt(); // 日数と余り int date = sc.nextInt(); int add = sc.nextInt(); // 食べた数 int sum = add; for(int i = 0; i < participant ; i++){ int num = sc.nextInt(); int eat = 0; for(int j =0; j < date ; j++){ if(j * num <= date){ eat++; }else{ break; } } System.out.println(eat); sum = sum + eat; } System.out.println(sum); } }
Submission Info
Submission Time | |
---|---|
Task | B - Chocolate |
User | fuu1214 |
Language | Java7 (OpenJDK 1.7.0) |
Score | 0 |
Code Size | 641 Byte |
Status | WA |
Exec Time | 115 ms |
Memory | 23124 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample-01.txt, sample-02.txt, sample-03.txt |
All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, sample-01.txt, sample-02.txt, sample-03.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | WA | 107 ms | 19028 KB |
02.txt | WA | 112 ms | 23124 KB |
03.txt | WA | 115 ms | 19156 KB |
04.txt | WA | 114 ms | 19028 KB |
05.txt | WA | 112 ms | 19156 KB |
06.txt | WA | 112 ms | 21076 KB |
07.txt | WA | 112 ms | 17236 KB |
08.txt | WA | 102 ms | 21076 KB |
09.txt | WA | 106 ms | 21076 KB |
sample-01.txt | WA | 94 ms | 22612 KB |
sample-02.txt | WA | 94 ms | 20820 KB |
sample-03.txt | WA | 94 ms | 18772 KB |