結果

問題 No.1934 Four Fruits
ユーザー eagleeagle
提出日時 2022-05-28 13:31:23
言語 Java19
(openjdk 21)
結果
AC  
実行時間 134 ms / 2,000 ms
コード長 460 bytes
コンパイル時間 2,262 ms
コンパイル使用メモリ 77,544 KB
実行使用メモリ 57,728 KB
最終ジャッジ日時 2023-10-20 23:03:50
合計ジャッジ時間 4,630 ms
ジャッジサーバーID
(参考情報)
judge9 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
57,728 KB
testcase_01 AC 122 ms
57,324 KB
testcase_02 AC 133 ms
57,496 KB
testcase_03 AC 127 ms
57,236 KB
testcase_04 AC 129 ms
57,320 KB
testcase_05 AC 126 ms
57,244 KB
testcase_06 AC 126 ms
57,308 KB
testcase_07 AC 130 ms
57,336 KB
testcase_08 AC 115 ms
56,280 KB
testcase_09 AC 127 ms
57,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int d;
		if(a == b && b == c) {
			d = a;
		} else if(a == b) {
			d = c;
		} else if(a == c) {
			d = b;
		} else if(b == c) {
			d = a;
		} else {
			d = 6 - (a + b + c);
		}
		System.out.println(d);
	}
}
0