結果
問題 |
No.2721 "Don't say N" Game
|
ユーザー |
|
提出日時 | 2024-04-12 21:22:52 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 368 bytes |
コンパイル時間 | 2,777 ms |
コンパイル使用メモリ | 246,960 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-02 22:56:13 |
合計ジャッジ時間 | 3,216 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 5 |
ソースコード
#include<bits/stdc++.h> using namespace std; void slv(){ int n;cin>>n; vector<int> f; for(int i=1;i*i<=n;i++){ if(n%i==0){ f.push_back(i); if(n!=i*i)f.push_back(n/i); } } if(int(f.size())%2==0)cout<<"K"<<endl; else cout<<"P"<<endl; } int main(){ int t;cin>>t; while(t--){ slv(); } }