結果
問題 |
No.264 じゃんけん
|
ユーザー |
![]() |
提出日時 | 2019-04-28 19:04:56 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 54 ms / 5,000 ms |
コード長 | 671 bytes |
コンパイル時間 | 2,239 ms |
コンパイル使用メモリ | 75,116 KB |
実行使用メモリ | 50,356 KB |
最終ジャッジ日時 | 2024-12-17 18:38:38 |
合計ジャッジ時間 | 3,015 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 |
ソースコード
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String... args) throws IOException { try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in))) { String line = reader.readLine(); System.out.println(battle(line.charAt(0), line.charAt(2))); } } static String battle(char me, char you) { switch (me - you) { case -1: case 2: return "Won"; case 0: return "Drew"; default: return "Lost"; } } }