結果
| 問題 |
No.2721 "Don't say N" Game
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-13 01:09:14 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| コード長 | 546 bytes |
| コンパイル時間 | 2,377 ms |
| コンパイル使用メモリ | 194,216 KB |
| 最終ジャッジ日時 | 2025-02-21 00:55:56 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 5 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0; i<n; i++)
#define debug 0
#define YES cout << "Yes" << endl;
#define NO cout << "No" << endl;
using ll = long long;
using ld = long double;
const int mod = 998244353;
const int MOD = 1000000007;
const double pi = atan2(0, -1);
const ll INF = 1LL << 63-1;
#include <time.h>
#include <chrono>
int main() {
int T;
cin >> T;
rep(t, T) {
int N;
cin >> N;
int sq = sqrt(N);
if (sq * sq == N) {
cout << "P" << endl;
}
else {
cout << "K" << endl;
}
}
}