結果
| 問題 |
No.793 うし数列 2
|
| コンテスト | |
| ユーザー |
Aquarius
|
| 提出日時 | 2019-03-18 21:15:16 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 340 bytes |
| コンパイル時間 | 1,587 ms |
| コンパイル使用メモリ | 165,324 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-19 04:26:34 |
| 合計ジャッジ時間 | 2,111 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 21 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
const long mod = 1000000007;
long powmod(long b, long e) {
if (e == 0) return 1;
if (e % 2 == 1) return powmod(b, e - 1) * b % mod;
long t = powmod(b, e / 2);
return t * t % mod;
}
int main() {
long n;
cin >> n;
cout << (4 * powmod(10, n) + mod - 1) * 333333336 % mod << endl;
}
Aquarius