Submission #1518658
Source Code Expand
import java.util.*; class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); Long result = 0l; int n = in.nextInt(); int[] a = new int[3]; for (int i = 0; i < n; i++) { for (int j = 0; j < a.length; j++) { a[j] = in.nextInt(); } if (a[0] > a[1] && a[0] > a[2] && a[1] > a[2]) { result += a[1]; }else if (a[0] > a[1] && a[0] > a[2] && a[2] > a[1]) { result += a[2]; } if (a[1] > a[0] && a[1] > a[2] && a[0] > a[2]) { result += a[0]; }else if (a[1] > a[0] && a[1] > a[2] && a[2] > a[0]) { result += a[2]; } if (a[2] > a[0] && a[2] > a[1] && a[0] > a[1]) { result += a[0]; }else if (a[2] > a[0] && a[2] > a[1] && a[1] > a[0]) { result += a[1]; } } System.out.println(result); } }
Submission Info
Submission Time | |
---|---|
Task | A - AtCoder Group Contest |
User | non |
Language | Java8 (OpenJDK 1.8.0) |
Score | 0 |
Code Size | 820 Byte |
Status | WA |
Exec Time | 629 ms |
Memory | 89332 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_example_01.txt, 00_example_02.txt |
All | 00_example_01.txt, 00_example_02.txt, 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_example_01.txt | WA | 93 ms | 21716 KB |
00_example_02.txt | WA | 106 ms | 20564 KB |
01.txt | WA | 93 ms | 18900 KB |
02.txt | WA | 99 ms | 21844 KB |
03.txt | WA | 97 ms | 21588 KB |
04.txt | WA | 94 ms | 21332 KB |
05.txt | WA | 257 ms | 38236 KB |
06.txt | WA | 629 ms | 85688 KB |
07.txt | WA | 583 ms | 89332 KB |
08.txt | WA | 603 ms | 85160 KB |
09.txt | WA | 597 ms | 87712 KB |
10.txt | WA | 591 ms | 85920 KB |