結果
| 問題 | No.1579 New Type of Nim |
| コンテスト | |
| ユーザー |
ks2m
|
| 提出日時 | 2021-07-02 22:06:18 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 58 ms / 2,000 ms |
| + 524µs | |
| コード長 | 370 bytes |
| 記録 | |
| コンパイル時間 | 1,339 ms |
| コンパイル使用メモリ | 84,456 KB |
| 実行使用メモリ | 43,264 KB |
| 最終ジャッジ日時 | 2026-08-23 19:23:59 |
| 合計ジャッジ時間 | 5,209 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 31 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
sc.close();
int x = Math.min(a, b);
int y = Math.max(a, b);
if (y - x <= 1 && x % 2 == 1) {
System.out.println("Q");
} else {
System.out.println("P");
}
}
}
ks2m