結果
問題 |
No.1129 Rating じゃんけん
|
ユーザー |
|
提出日時 | 2021-02-05 09:58:39 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 131 ms / 2,000 ms |
コード長 | 1,281 bytes |
コンパイル時間 | 4,071 ms |
コンパイル使用メモリ | 79,172 KB |
実行使用メモリ | 41,512 KB |
最終ジャッジ日時 | 2024-07-01 22:53:04 |
合計ジャッジ時間 | 7,567 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 16 |
ソースコード
import java.util.ArrayList; import java.util.List; import java.util.Scanner; // https://yukicoder.me/problems/no/1129 public class RatingJanken1129 { public static void main(String[] args) { // 標準入力から読み込む際に、Scan Scanner sc = new Scanner(System.in); // String 1つ分を読み込む int a = Integer.parseInt(sc.next()); int b = Integer.parseInt(sc.next()); int c = Integer.parseInt(sc.next()); int d = Integer.parseInt(sc.next()); if (a > c) { System.out.println("null"); } else if (c > a) { System.out.println("tRue"); } else { if (b == d) { System.out.println("Draw"); } else { switch (b) { case 0: if (d == 1) { System.out.println("null"); } else { System.out.println("tRue"); } break; case 1: if (d == 2) { System.out.println("null"); } else { System.out.println("tRue"); } break; case 2: if (d == 0) { System.out.println("null"); } else { System.out.println("tRue"); } break; } } } } }