結果

問題 No.220 世界のなんとか2
ユーザー Pachicobue
提出日時 2017-12-31 20:37:26
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 11 ms / 1,000 ms
コード長 302 bytes
コンパイル時間 631 ms
コンパイル使用メモリ 66,124 KB
最終ジャッジ日時 2025-01-05 06:52:03
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
using ull = unsigned long long;

int main()
{
    int P;
    cin >> P;
    P--;
    ull ans1 = 10ULL;
    ull ans2 = 6ULL;
    for (int i = 0; i < P; i++) {
        ans1 *= 10ULL;
        ans2 *= 9ULL;
    }
    cout << ans1 - ans2 - 1 << endl;
    return 0;
}
0