結果

問題 No.851 テストケース
ユーザー CuriousFairy315
提出日時 2019-06-12 14:46:34
言語 Java
(openjdk 23)
結果
AC  
実行時間 139 ms / 3,153 ms
コード長 577 bytes
コンパイル時間 2,319 ms
コンパイル使用メモリ 74,592 KB
実行使用メモリ 41,796 KB
最終ジャッジ日時 2024-10-10 18:50:23
合計ジャッジ時間 6,335 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

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