結果

問題 No.220 世界のなんとか2
ユーザー PachicobuePachicobue
提出日時 2017-12-31 20:31:49
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 953 bytes
コンパイル時間 1,920 ms
コンパイル使用メモリ 196,424 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-23 12:33:55
合計ジャッジ時間 2,645 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 1 ms
4,376 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 2 ms
4,380 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 AC 2 ms
4,380 KB
testcase_17 AC 1 ms
4,384 KB
testcase_18 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define show(x) cerr << #x << " = " << x << endl
using namespace std;
using ull = unsigned long long;
template <typename T>
vector<T> Vec(int n, T v)
{
    return vector<T>(n, v);
}
template <class... Args>
auto Vec(int n, Args... args)
{
    auto val = Vec(args...);
    return vector<decltype(val)>(n, move(val));
}

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int P;
    cin >> P;
    constexpr ull ans[19] = {
        3ULL,
        45ULL,
        513ULL,
        5625ULL,
        60633ULL,
        645705ULL,
        6811353ULL,
        71302185ULL,
        741719673ULL,
        7675477065ULL,
        79079293593ULL,
        811713642345ULL,
        8305422781113ULL,
        84748805030025ULL,
        862739245270233ULL,
        8764653207432105ULL,
        88881878866888953ULL,
        899936909802000585ULL,
        9099432188218005273ULL,
    };
    cout << ans[P - 1] << endl;
    return 0;
}
0