結果

問題 No.492 IOI数列
ユーザー 0214sh70214sh7
提出日時 2017-04-06 00:19:12
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 593 bytes
コンパイル時間 353 ms
コンパイル使用メモリ 39,424 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-08 11:08:45
合計ジャッジ時間 884 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cmath>
#include <cstdlib>
#define REP(i,n) for (int i=0;i<(n);i++)
#define MOD 1000000007
typedef 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);
	printf("1");
	REP(i,(N-1)%11){printf("01");}
	printf("\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;
}
0