結果

問題 No.851 テストケース
ユーザー shinwisteriashinwisteria
提出日時 2019-08-30 13:28:30
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 596 bytes
コンパイル時間 5,305 ms
コンパイル使用メモリ 75,604 KB
実行使用メモリ 54,400 KB
最終ジャッジ日時 2024-05-01 04:44:55
合計ジャッジ時間 8,767 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
54,268 KB
testcase_01 AC 129 ms
54,148 KB
testcase_02 WA -
testcase_03 AC 126 ms
53,944 KB
testcase_04 AC 129 ms
53,828 KB
testcase_05 AC 128 ms
54,108 KB
testcase_06 AC 131 ms
54,252 KB
testcase_07 AC 133 ms
53,956 KB
testcase_08 AC 132 ms
54,148 KB
testcase_09 AC 132 ms
54,132 KB
testcase_10 AC 131 ms
54,000 KB
testcase_11 AC 131 ms
54,188 KB
testcase_12 AC 131 ms
54,400 KB
testcase_13 AC 130 ms
54,024 KB
testcase_14 AC 129 ms
54,364 KB
testcase_15 AC 132 ms
54,236 KB
testcase_16 AC 130 ms
53,848 KB
testcase_17 AC 116 ms
52,784 KB
testcase_18 AC 129 ms
54,220 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 129 ms
54,132 KB
testcase_22 AC 128 ms
54,236 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