結果

問題 No.851 テストケース
ユーザー CuriousFairy315CuriousFairy315
提出日時 2019-06-12 14:46:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 142 ms / 3,153 ms
コード長 577 bytes
コンパイル時間 2,710 ms
コンパイル使用メモリ 74,696 KB
実行使用メモリ 41,556 KB
最終ジャッジ日時 2024-04-19 02:10:55
合計ジャッジ時間 6,418 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 138 ms
41,232 KB
testcase_01 AC 126 ms
41,020 KB
testcase_02 AC 125 ms
41,196 KB
testcase_03 AC 124 ms
41,388 KB
testcase_04 AC 122 ms
41,432 KB
testcase_05 AC 126 ms
41,484 KB
testcase_06 AC 122 ms
41,016 KB
testcase_07 AC 115 ms
40,852 KB
testcase_08 AC 119 ms
40,764 KB
testcase_09 AC 109 ms
40,684 KB
testcase_10 AC 108 ms
39,952 KB
testcase_11 AC 117 ms
41,264 KB
testcase_12 AC 110 ms
40,784 KB
testcase_13 AC 127 ms
40,412 KB
testcase_14 AC 141 ms
41,292 KB
testcase_15 AC 141 ms
41,040 KB
testcase_16 AC 142 ms
41,556 KB
testcase_17 AC 117 ms
40,984 KB
testcase_18 AC 122 ms
41,192 KB
testcase_19 AC 113 ms
40,740 KB
testcase_20 AC 110 ms
39,928 KB
testcase_21 AC 120 ms
41,244 KB
testcase_22 AC 107 ms
39,768 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		sc.nextLine();
		long A[] = new long[3];
		String A1 = sc.nextLine();
		if (A1.indexOf(' ') < 0) {
			A[0] = Long.valueOf(A1);
			A[1] = sc.nextLong();
			A[2] = sc.nextLong();
			if (A[0] == A[1] || A[1] == A[2]) System.out.println(Math.min(A[0], A[1]) + Math.min(A[1], A[2]));
			else {
				Arrays.sort(A);
				System.out.println(A[0] + A[2]);
			}
		} else {
			System.out.println("\"assert\"");
		}
		sc.close();
	}
}
0