結果
問題 | No.220 世界のなんとか2 |
ユーザー | uenoku |
提出日時 | 2017-01-08 02:57:18 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 451 bytes |
コンパイル時間 | 632 ms |
コンパイル使用メモリ | 66,572 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-17 17:43:34 |
合計ジャッジ時間 | 1,557 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
#include <algorithm> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < (n); i++) #define rrep(i, n) for (int i = (n)-1; i >= 0; i--) using namespace std; typedef long long int lli; lli pow(lli p, lli n) { lli ans = 1; rep(i, n) ans *= p; return ans; } int main() { lli p; cin >> p; cout << pow(10, p) - 1 - pow(9, p) * 2 / 3 << endl; }