結果

問題 No.851 テストケース
ユーザー tsunabit
提出日時 2019-08-09 17:34:06
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 554 bytes
コンパイル時間 3,436 ms
コンパイル使用メモリ 74,372 KB
実行使用メモリ 41,824 KB
最終ジャッジ日時 2024-07-19 07:40:02
合計ジャッジ時間 6,820 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 18 WA * 2
権限があれば一括ダウンロードができます

ソースコード

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