結果
| 問題 |
No.904 サメトロ
|
| コンテスト | |
| ユーザー |
htensai
|
| 提出日時 | 2019-11-11 09:32:12 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 349 bytes |
| コンパイル時間 | 1,971 ms |
| コンパイル使用メモリ | 73,856 KB |
| 実行使用メモリ | 41,460 KB |
| 最終ジャッジ日時 | 2024-09-15 05:10:08 |
| 合計ジャッジ時間 | 7,958 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 WA * 14 |
ソースコード
import java.util.*;
public class Main {
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int sumA = 0;
int sumB = 0;
for (int i = 0; i < n - 1; i++) {
sumA += sc.nextInt();
sumB += sc.nextInt();
}
int count = Math.min(sumA, sumB) + 1;
System.out.println(count);
}
}
htensai