結果
| 問題 |
No.2721 "Don't say N" Game
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-12 21:27:21 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 6 ms / 2,000 ms |
| コード長 | 456 bytes |
| コンパイル時間 | 1,516 ms |
| コンパイル使用メモリ | 167,964 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-02 22:59:11 |
| 合計ジャッジ時間 | 1,950 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 5 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
int a;
for (int i = 0; i < n; i++)
{
int cnt = 0;
cin >> a;
for (int i = 1; i <= a; i++)
{
if (a % i == 0)
{
cnt++;
}
}
if (cnt % 2)
{
cout << "P" << endl;
}
else
{
cout << "K" << endl;
}
}
}