結果
| 問題 | No.492 IOI数列 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2017-03-10 23:13:06 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 1,000 ms | 
| コード長 | 562 bytes | 
| コンパイル時間 | 1,458 ms | 
| コンパイル使用メモリ | 168,044 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-06-24 08:34:18 | 
| 合計ジャッジ時間 | 2,230 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 19 | 
ソースコード
#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;
	if (n % 11 == 0) {
		cout << 0 << endl;
		return 0;
	}
	string ans = "";
	for (int i = 1; i < n % 11; i++) ans += "10";
	ans += "1";
	cout << ans << endl;
	return 0;
}
            
            
            
        