結果

問題 No.2725 Coprime Game 2
ユーザー Carpenters-CatCarpenters-Cat
提出日時 2024-04-12 22:27:39
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 280 bytes
コンパイル時間 4,654 ms
コンパイル使用メモリ 255,028 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-12 22:27:47
合計ジャッジ時間 6,776 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 2 ms
6,940 KB
testcase_03 AC 208 ms
6,944 KB
testcase_04 AC 219 ms
6,940 KB
testcase_05 AC 209 ms
6,944 KB
testcase_06 WA -
testcase_07 AC 128 ms
6,944 KB
testcase_08 AC 195 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
int main () {
	int T;
	cin >> T;
	while (T--) {
		ll N;
		cin >> N;
		int fl = 2;
		while (N % fl == 0) fl ++;
		cout << (gcd(N, fl) == 1 ? "K" : "P") << endl;
	}
}
0