結果

問題 No.2722 Kenken Fight
ユーザー coindarwcoindarw
提出日時 2024-04-12 22:02:16
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 160 ms / 2,000 ms
コード長 1,644 bytes
コンパイル時間 3,506 ms
コンパイル使用メモリ 272,676 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-12 22:02:21
合計ジャッジ時間 5,310 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 KB
testcase_01 AC 94 ms
6,944 KB
testcase_02 AC 133 ms
6,944 KB
testcase_03 AC 139 ms
6,944 KB
testcase_04 AC 127 ms
6,944 KB
testcase_05 AC 160 ms
6,940 KB
testcase_06 AC 142 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using ll = long long;
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define reps(i, n) for (int i = 1, i##_len = (n); i <= i##_len; ++i)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; --i)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; --i)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define repc2(i, s, n) for (int i = (s); i <= (int)(n); i++)
constexpr int inf = 2000'000'000;
constexpr ll linf = 4000000000000000000ll;
constexpr ll M7 = 1000000007ll;
constexpr ll M09 = 1000000009ll;
constexpr ll M9 = 998244353ll;
#define all(v) begin(v), end(v)
#define rall(v) rbegin(v), rend(v)
using namespace std;
template <typename T>
inline ostream& operator<<(ostream& os, const vector<T>& v) {
    for (auto itr = v.begin(); itr != v.end(); ++itr) {
        os << *itr;
        if (itr != v.end() - 1) {
            os << " ";
        }
    }
    return os;
}
template <typename T, typename U>
std::ostream& operator<<(std::ostream& os, const std::pair<T, U>& p) noexcept {
    return os << "(" << p.first << ", " << p.second << ")";
}

ll euler_phi(ll n) {
    ll res = n;
    for (ll i = 2; i * i <= n; i++) {
        if (n % i == 0) {
            res -= res / i;
            while (n % i == 0) n /= i;
        }
    }
    if (n > 1) res -= res / n;
    return res;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int Q;
    cin >> Q;
    while (Q--) {
        ll n;
        cin >> n;
        if (n == 1) {
            cout << "P" << endl;
            continue;
        } else {
            cout << "K" << endl;
        }
    }
    return 0;
}
0