結果
問題 |
No.2721 "Don't say N" Game
|
ユーザー |
|
提出日時 | 2024-06-02 20:11:03 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 402 bytes |
コンパイル時間 | 1,958 ms |
コンパイル使用メモリ | 193,156 KB |
最終ジャッジ日時 | 2025-02-21 19:19:55 |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 5 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(0); const int m = 1000; vector<int> tb(m + 1, 1); for(int i = 2; i <= m; i++){ for(int j = i; j <= m; j += i){ tb[j]++; } } int T; cin >> T; while(T--){ int v; cin >> v; cout << (tb[v] & 1 ? 'P' : 'K') << '\n'; } }