結果
問題 | No.8 N言っちゃダメゲーム |
ユーザー |
![]() |
提出日時 | 2017-09-11 19:06:37 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 165 ms / 5,000 ms |
コード長 | 601 bytes |
コンパイル時間 | 3,740 ms |
コンパイル使用メモリ | 76,424 KB |
実行使用メモリ | 41,772 KB |
最終ジャッジ日時 | 2024-11-07 17:03:40 |
合計ジャッジ時間 | 6,147 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
package yukicoder; import java.util.Scanner; public class StickUpGame { public static void main(String[] args){ @SuppressWarnings("resource") Scanner s = new Scanner(System.in); int game = s.nextInt(); int stick[] = new int[game]; int maxNum[] = new int[game]; for(int i = 0 ; i < game ; i++){ stick[i] = s.nextInt(); maxNum[i] = s.nextInt(); } for(int i = 0 ; i < game ; i++){ int n = stick[i]; int k = maxNum[i]; if((n <= k) || ((n%(k+1)) != 1)){ System.out.println("Win"); }else{ System.out.println("Lose"); } } } }