結果

問題 No.2721 "Don't say N" Game
ユーザー forest3
提出日時 2024-07-12 14:57:58
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 358 bytes
コンパイル時間 1,779 ms
コンパイル使用メモリ 168,260 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-12 14:58:01
合計ジャッジ時間 3,050 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

using ll = long long;
#define rep(i, n) for(int i = 0; i < n; i++)

int main() {
	int T;
	cin >> T;
	rep(i, T) {
		int N;
		cin >> N;
		int c = 0;
		for(int j = 1; j * j <= N; j++) {
			if(N % j == 0) {
				c++;
				if(N / j != j) c++;
			}
		}
		string s = "K";
		if(c % 2) s = "P";
		cout << s << endl;
	}
}

0