結果

問題 No.220 世界のなんとか2
ユーザー Pachicobue
提出日時 2017-12-31 20:39:00
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 290 bytes
コンパイル時間 511 ms
コンパイル使用メモリ 54,236 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-21 15:33:39
合計ジャッジ時間 1,269 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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