結果

問題 No.851 テストケース
ユーザー Maeda
提出日時 2025-09-08 17:20:28
言語 Java
(openjdk 23)
結果
RE  
実行時間 -
コード長 735 bytes
コンパイル時間 2,473 ms
コンパイル使用メモリ 76,796 KB
実行使用メモリ 46,716 KB
最終ジャッジ日時 2025-09-08 17:20:35
合計ジャッジ時間 7,085 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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);
			int a = i.intValue();
        	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