結果
問題 | No.8 N言っちゃダメゲーム |
ユーザー |
![]() |
提出日時 | 2016-10-19 14:15:32 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 158 ms / 5,000 ms |
コード長 | 606 bytes |
コンパイル時間 | 2,018 ms |
コンパイル使用メモリ | 74,056 KB |
実行使用メモリ | 41,784 KB |
最終ジャッジ日時 | 2024-11-22 15:18:01 |
合計ジャッジ時間 | 4,569 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
import java.util.*; public class Main { private static Scanner sc = new Scanner(System.in); public static void main(String[] args) throws Exception { int p = sc.nextInt(); for (int i = 0;i < p;i++) { int n = sc.nextInt(); int k = sc.nextInt(); if (n-1 <= k) { System.out.println("Win"); continue; } if ((n-1)%(k+1) == 0) { System.out.println("Lose"); } else { System.out.println("Win"); } } } }