結果
| 問題 |
No.492 IOI数列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-02-23 04:24:44 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 276 bytes |
| コンパイル時間 | 574 ms |
| コンパイル使用メモリ | 64,184 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-10 01:30:38 |
| 合計ジャッジ時間 | 1,525 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 |
コンパイルメッセージ
main.cpp:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
5 | main()
| ^~~~
ソースコード
#include<iostream>
using namespace std;
long mod=1e9+7;
long p(long a,long b){return b?p(a*a%mod,b/2)*(b%2?a:1)%mod:1;}
main()
{
long N;cin>>N;
cout<<(p(100,N)-1)*p(99,mod-2)%mod<<endl;
N%=11;
long T=0;
for(long x=1,i=0;i<N;i++)
{
T+=x;
x*=100;
}
cout<<T<<endl;
}