結果

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

ソースコード

diff #

import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        String check = scan.nextLine();
        if(check.contains(" ")){
        	System.out.println("\"assert\"");
        }else{
        	Integer i = Integer.valueOf(check);
			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