結果

問題 No.851 テストケース
ユーザー shinwisteriashinwisteria
提出日時 2019-08-30 13:29:41
言語 Java21
(openjdk 21)
結果
AC  
実行時間 119 ms / 3,153 ms
コード長 600 bytes
コンパイル時間 3,183 ms
コンパイル使用メモリ 75,648 KB
実行使用メモリ 54,200 KB
最終ジャッジ日時 2024-05-01 04:46:10
合計ジャッジ時間 6,332 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
54,108 KB
testcase_01 AC 109 ms
53,092 KB
testcase_02 AC 111 ms
53,976 KB
testcase_03 AC 103 ms
52,820 KB
testcase_04 AC 112 ms
54,080 KB
testcase_05 AC 111 ms
54,052 KB
testcase_06 AC 114 ms
54,200 KB
testcase_07 AC 111 ms
53,952 KB
testcase_08 AC 111 ms
53,984 KB
testcase_09 AC 105 ms
53,136 KB
testcase_10 AC 103 ms
53,132 KB
testcase_11 AC 113 ms
53,988 KB
testcase_12 AC 112 ms
54,080 KB
testcase_13 AC 119 ms
54,140 KB
testcase_14 AC 107 ms
53,136 KB
testcase_15 AC 104 ms
53,104 KB
testcase_16 AC 103 ms
52,972 KB
testcase_17 AC 110 ms
53,120 KB
testcase_18 AC 116 ms
53,824 KB
testcase_19 AC 100 ms
52,956 KB
testcase_20 AC 102 ms
53,620 KB
testcase_21 AC 103 ms
53,252 KB
testcase_22 AC 118 ms
54,104 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package con_level_1half;
import java.util.Scanner;
import java.util.TreeSet;
public class Con851 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		s.nextLine();
		String str = s.nextLine();
		Long A1 = 0l,A2 = 0l,A3 = 0l;
		if(str.contains(" ")){
			System.out.println("\"assert\"");
		}else{
			A1 = Long.parseLong(str);
			A2 = s.nextLong();
			A3 = s.nextLong();

			TreeSet<Long> ts = new TreeSet();
			ts.add(A1+A2);
			ts.add(A1+A3);
			ts.add(A2+A3);
			if(ts.size() > 1){
				ts.pollLast();
			}

			System.out.println(ts.pollLast());
		}
		s.close();
	}

}
0