結果

問題 No.851 テストケース
ユーザー Maeda
提出日時 2025-09-08 17:58:40
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 704 bytes
コンパイル時間 2,588 ms
コンパイル使用メモリ 76,756 KB
実行使用メモリ 46,508 KB
最終ジャッジ日時 2025-09-08 17:58:48
合計ジャッジ時間 6,266 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String n = scan.nextLine();
        String check = scan.nextLine();
        if(check.contains(" ")){
        	System.out.println("\"assert\"");
        }else{
			long a = Long.parseLong(check);
        	long b = scan.nextLong();
        	long c = scan.nextLong();
        	
        	long ab = a+b;
        	long ac = a+c;
        	long bc = b+c;
        	if(ab > ac && ac > bc){
        		System.out.println(ac);
        	}else if(ac > bc && bc > ab){
        		System.out.println(bc);
        	}else{
        		System.out.println(ab);
        	}
        }
    }
}
0