結果
問題 | No.492 IOI数列 |
ユーザー |
![]() |
提出日時 | 2017-04-06 00:24:19 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 638 bytes |
コンパイル時間 | 378 ms |
コンパイル使用メモリ | 39,424 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-08 11:08:51 |
合計ジャッジ時間 | 913 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
外部呼び出し有り |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 |
ソースコード
#include <cstdio>#include <cmath>#include <cstdlib>#define REP(i,n) for (int i=0;i<(n);i++)#define MOD 1000000007typedef long long int ll;ll A(ll);ll powr(ll,ll);int main(){long long N;long long k=0;scanf("%lld",&N);long long a=(powr(100,N-1)%MOD+(powr(100,N-1)-1)*powr(99,(MOD-2))%MOD)%MOD;printf("%lld\n",a);if(N%11!=0){printf("1");REP(i,(N-1)%11){printf("01");}printf("\n");}else{printf("0\n");}system("pause");return 0;}ll powr(ll x, ll n){if(n == 0){return 1;}ll res = powr((x*x)%1000000007, n / 2);if(n%2==1){res = res*x%MOD;}return res;}