結果
| 問題 |
No.557 点対称
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-11-09 19:01:21 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 428 bytes |
| コンパイル時間 | 477 ms |
| コンパイル使用メモリ | 58,456 KB |
| 実行使用メモリ | 13,568 KB |
| 最終ジャッジ日時 | 2024-11-24 07:32:05 |
| 合計ジャッジ時間 | 34,764 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 WA * 3 TLE * 11 |
ソースコード
#include <iostream>
#include <math.h>
using namespace std;
typedef unsigned long long UL;
int main(int argc, char* argv[])
{
UL N;
cin>>N;
const UL MOD=1000000007;
const UL P5=pow(5.0,10);
if (N==1){
cout<<2<<endl;
return 0;
}
UL n=N/2;
UL i;
UL aw;
aw=4;
while (n>=10){
aw*=P5;
aw%=MOD;
n-=10;
}
for (i=1;i<n;i++){
aw*=5;
aw%=MOD;
}
if (N%2==1){
aw*=3;
aw%=MOD;
}
cout<<aw<<endl;
return 0;
}