結果

問題 No.851 テストケース
ユーザー tsunabittsunabit
提出日時 2019-08-09 17:37:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 3,153 ms
コード長 558 bytes
コンパイル時間 4,343 ms
コンパイル使用メモリ 72,760 KB
実行使用メモリ 56,492 KB
最終ジャッジ日時 2023-09-26 13:18:21
合計ジャッジ時間 7,261 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,792 KB
testcase_01 AC 122 ms
55,976 KB
testcase_02 AC 118 ms
56,020 KB
testcase_03 AC 124 ms
56,132 KB
testcase_04 AC 123 ms
55,988 KB
testcase_05 AC 122 ms
55,832 KB
testcase_06 AC 122 ms
56,108 KB
testcase_07 AC 118 ms
55,596 KB
testcase_08 AC 126 ms
55,612 KB
testcase_09 AC 126 ms
55,940 KB
testcase_10 AC 124 ms
56,192 KB
testcase_11 AC 123 ms
56,056 KB
testcase_12 AC 124 ms
56,124 KB
testcase_13 AC 122 ms
55,280 KB
testcase_14 AC 124 ms
55,500 KB
testcase_15 AC 123 ms
55,484 KB
testcase_16 AC 123 ms
55,696 KB
testcase_17 AC 123 ms
56,124 KB
testcase_18 AC 122 ms
55,840 KB
testcase_19 AC 114 ms
55,600 KB
testcase_20 AC 118 ms
55,736 KB
testcase_21 AC 124 ms
55,816 KB
testcase_22 AC 126 ms
56,492 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