結果

問題 No.492 IOI数列
ユーザー 0214sh70214sh7
提出日時 2017-04-06 00:19:12
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 593 bytes
コンパイル時間 264 ms
コンパイル使用メモリ 38,240 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-09-22 20:30:18
合計ジャッジ時間 1,258 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4 ms
4,380 KB
testcase_01 AC 4 ms
4,380 KB
testcase_02 WA -
testcase_03 AC 4 ms
4,376 KB
testcase_04 AC 4 ms
4,376 KB
testcase_05 AC 3 ms
4,380 KB
testcase_06 AC 3 ms
4,376 KB
testcase_07 AC 3 ms
4,380 KB
testcase_08 AC 4 ms
4,380 KB
testcase_09 AC 4 ms
4,376 KB
testcase_10 AC 4 ms
4,376 KB
testcase_11 AC 3 ms
4,376 KB
testcase_12 AC 3 ms
4,376 KB
testcase_13 AC 4 ms
4,376 KB
testcase_14 AC 4 ms
4,376 KB
testcase_15 AC 4 ms
4,380 KB
testcase_16 AC 4 ms
4,376 KB
testcase_17 AC 4 ms
4,376 KB
testcase_18 AC 4 ms
4,376 KB
testcase_19 AC 3 ms
4,380 KB
testcase_20 AC 4 ms
4,376 KB
testcase_21 AC 3 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

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