結果
| 問題 | No.8 N言っちゃダメゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-11-21 11:59:32 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 77 ms / 5,000 ms |
| + 232µs | |
| コード長 | 499 bytes |
| 記録 | |
| コンパイル時間 | 1,419 ms |
| コンパイル使用メモリ | 85,604 KB |
| 実行使用メモリ | 46,644 KB |
| 最終ジャッジ日時 | 2026-09-30 06:20:38 |
| 合計ジャッジ時間 | 3,321 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int[] a = new int[n * 2];
for (int i = 0; i < n*2; i++) {
a[i] = scanner.nextInt();
}
for (int i = 0; i < n * 2; i += 2) {
int ans = a[i] - 1;
while (ans > a[i + 1]) {
ans -= a[i+1]+1;
}
if (ans > 0 && ans <= a[i+1]) {
System.out.println("Win");
} else {
System.out.println("Lose");
}
}
}
}