結果

問題 No.851 テストケース
ユーザー tsunabittsunabit
提出日時 2019-08-09 17:34:06
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 554 bytes
コンパイル時間 3,471 ms
コンパイル使用メモリ 72,544 KB
実行使用メモリ 56,336 KB
最終ジャッジ日時 2023-09-26 13:18:10
合計ジャッジ時間 7,559 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
55,756 KB
testcase_01 AC 130 ms
55,824 KB
testcase_02 WA -
testcase_03 AC 127 ms
55,876 KB
testcase_04 AC 131 ms
55,964 KB
testcase_05 AC 130 ms
55,544 KB
testcase_06 AC 128 ms
56,120 KB
testcase_07 AC 129 ms
55,980 KB
testcase_08 AC 129 ms
56,220 KB
testcase_09 AC 129 ms
55,780 KB
testcase_10 AC 127 ms
55,988 KB
testcase_11 AC 127 ms
55,944 KB
testcase_12 AC 128 ms
56,268 KB
testcase_13 AC 127 ms
55,896 KB
testcase_14 AC 128 ms
55,796 KB
testcase_15 AC 126 ms
56,204 KB
testcase_16 AC 129 ms
56,104 KB
testcase_17 AC 126 ms
55,688 KB
testcase_18 AC 125 ms
55,864 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 128 ms
55,888 KB
testcase_22 AC 127 ms
56,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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]);
    }
}
0