結果
| 問題 |
No.8 N言っちゃダメゲーム
|
| ユーザー |
|
| 提出日時 | 2017-11-21 11:54:58 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 496 bytes |
| コンパイル時間 | 2,694 ms |
| コンパイル使用メモリ | 74,944 KB |
| 実行使用メモリ | 56,736 KB |
| 最終ジャッジ日時 | 2024-11-26 08:04:25 |
| 合計ジャッジ時間 | 3,988 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 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];
}
if (ans > 0 && ans > a[i+1]) {
System.out.println("win");
} else {
System.out.println("lose");
}
}
}
}