結果
問題 | No.1934 Four Fruits |
ユーザー |
|
提出日時 | 2022-05-28 13:31:23 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 128 ms / 2,000 ms |
コード長 | 460 bytes |
コンパイル時間 | 4,476 ms |
コンパイル使用メモリ | 73,644 KB |
実行使用メモリ | 41,600 KB |
最終ジャッジ日時 | 2024-09-20 21:45:46 |
合計ジャッジ時間 | 6,249 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
ソースコード
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); } }