結果
問題 | No.264 じゃんけん |
ユーザー |
![]() |
提出日時 | 2016-01-19 16:19:53 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 56 ms / 5,000 ms |
コード長 | 646 bytes |
コンパイル時間 | 2,410 ms |
コンパイル使用メモリ | 74,548 KB |
実行使用メモリ | 50,488 KB |
最終ジャッジ日時 | 2024-09-21 08:01:09 |
合計ジャッジ時間 | 3,313 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 |
ソースコード
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; public class Main { public static void main(String[] args) throws IOException { BufferedReader stdReader =new BufferedReader(new InputStreamReader(System.in)); PrintWriter out = new PrintWriter(System.out); String[] person = stdReader.readLine().split(" "); int N = Integer.parseInt(person[0]); int K = Integer.parseInt(person[1]); if(N==K){ out.println("Drew"); }else if (N-K==-1||N-K==2) { out.println("Won"); }else if (N-K==1||N-K==-2) { out.println("Lost"); } out.flush(); } }