結果
問題 |
No.904 サメトロ
|
ユーザー |
![]() |
提出日時 | 2020-05-08 11:38:36 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 308 bytes |
コンパイル時間 | 1,841 ms |
コンパイル使用メモリ | 74,116 KB |
実行使用メモリ | 56,336 KB |
最終ジャッジ日時 | 2024-07-03 09:48:55 |
合計ジャッジ時間 | 7,372 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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(); long a = 0; long b = 0; for (int i = 1; i < n; i++) { a += sc.nextInt(); b += sc.nextInt(); } System.out.println(Math.min(a, b) + 1); } }