結果
| 問題 |
No.793 うし数列 2
|
| コンテスト | |
| ユーザー |
dsytk7
|
| 提出日時 | 2019-02-23 00:01:11 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 632 bytes |
| コンパイル時間 | 1,303 ms |
| コンパイル使用メモリ | 166,024 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-26 05:58:20 |
| 合計ジャッジ時間 | 2,127 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 15 WA * 6 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int (i)=(0);(i)<(int)(n);++(i))
using ll = long long;
using P = pair<ll, ll>;
using namespace std;
template<class T> void vin(vector<T>& v, int n) {
v.resize(n);
for (int i = 0; i < n; ++i) {
cin >> v[i];
}
}
ll mod_pow(ll x, ll n, ll mod=1e9+7)
{
ll ret = 1;
while (n > 0)
{
if (n&1) ret = ret * x % mod;
x = x * x % mod;
n >>= 1;
}
return ret;
}
int main()
{
const ll mod = 1e9 + 7;
ll n;
cin >> n;
ll tmp = (4LL * mod_pow(10LL, n)) % mod;
cout << (tmp - 1) / 3LL << endl;
}
dsytk7