結果
問題 | No.8 N言っちゃダメゲーム |
ユーザー | kou6839 |
提出日時 | 2014-11-09 12:49:22 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 157 ms / 5,000 ms |
コード長 | 504 bytes |
コンパイル時間 | 2,200 ms |
コンパイル使用メモリ | 72,012 KB |
実行使用メモリ | 56,316 KB |
最終ジャッジ日時 | 2023-08-30 02:46:36 |
合計ジャッジ時間 | 4,626 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 128 ms
55,560 KB |
testcase_01 | AC | 128 ms
55,784 KB |
testcase_02 | AC | 129 ms
55,596 KB |
testcase_03 | AC | 154 ms
54,432 KB |
testcase_04 | AC | 157 ms
56,100 KB |
testcase_05 | AC | 149 ms
55,948 KB |
testcase_06 | AC | 150 ms
55,960 KB |
testcase_07 | AC | 150 ms
55,924 KB |
testcase_08 | AC | 150 ms
56,316 KB |
testcase_09 | AC | 150 ms
56,156 KB |
testcase_10 | AC | 149 ms
55,980 KB |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int P =sc.nextInt(); int[] N = new int[P]; int[] K = new int[P]; for(int i=0;i<P;i++){ N[i]=sc.nextInt(); K[i]=sc.nextInt(); } for(int i=0;i<P;i++){ int temp=N[i]-1; while(temp>0){ temp-=K[i]+1; } temp+=K[i]+1; if(temp<=K[i]){ System.out.println("Win"); }else{ System.out.println("Lose"); } } } }