結果
| 問題 |
No.492 IOI数列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-03-10 23:11:07 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 506 bytes |
| コンパイル時間 | 1,813 ms |
| コンパイル使用メモリ | 167,216 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-24 08:33:53 |
| 合計ジャッジ時間 | 2,244 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll modpow(ll x, ll n, ll mod) {
ll res = 1;
while (n > 0) {
if (n & 1) res = res * x % mod;
x = x * x % mod;
n >>= 1;
}
return res;
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll n;
cin >> n;
ll m1 = 1000000007;
cout << (modpow(100, n, m1) + m1 - 1) % m1 * modpow(99, m1 - 2, m1) % m1 << endl;
string ans = "";
for (int i = 1; i < n % 11; i++) ans += "10";
ans += "1";
cout << ans << endl;
return 0;
}