結果
| 問題 |
No.492 IOI数列
|
| コンテスト | |
| ユーザー |
0214sh7
|
| 提出日時 | 2017-04-06 00:14:17 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 584 bytes |
| コンパイル時間 | 614 ms |
| コンパイル使用メモリ | 39,296 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-08 11:08:43 |
| 合計ジャッジ時間 | 1,035 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 WA * 4 |
ソースコード
#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);
a=(pow(100,(N%11)+0.0)-1)/99;
printf("%lld\n",a);
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;
}
0214sh7