結果
問題 |
No.851 テストケース
|
ユーザー |
|
提出日時 | 2019-08-09 17:37:35 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 121 ms / 3,153 ms |
コード長 | 558 bytes |
コンパイル時間 | 3,749 ms |
コンパイル使用メモリ | 80,684 KB |
実行使用メモリ | 41,512 KB |
最終ジャッジ日時 | 2024-07-19 07:40:11 |
合計ジャッジ時間 | 6,270 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
import java.util.*; import java.io.*; import java.math.*; public class No851 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String n = sc.nextLine(); String aa = sc.nextLine(); if(aa.contains(" ")) { System.out.println("\"assert\""); return; } long a1 = Long.parseLong(aa), a2 = sc.nextLong(), a3 = sc.nextLong(); long[] a = {a1 + a2, a1 + a3, a2 + a3}; Arrays.sort(a); if(a[1] == a[2]) System.out.println(a[0]); else System.out.println(a[1]); } }