結果
| 問題 |
No.1579 New Type of Nim
|
| コンテスト | |
| ユーザー |
ks2m
|
| 提出日時 | 2021-07-02 21:56:12 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 334 bytes |
| コンパイル時間 | 2,130 ms |
| コンパイル使用メモリ | 74,060 KB |
| 実行使用メモリ | 41,364 KB |
| 最終ジャッジ日時 | 2024-06-29 11:28:09 |
| 合計ジャッジ時間 | 7,895 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 WA * 5 |
ソースコード
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();
if (Math.abs(a - b) <= 1 && (a + b) % 4 == 3) {
System.out.println("Q");
} else {
System.out.println("P");
}
}
}
ks2m