結果
| 問題 |
No.557 点対称
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-11-09 18:56:33 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 428 bytes |
| コンパイル時間 | 412 ms |
| コンパイル使用メモリ | 59,096 KB |
| 実行使用メモリ | 16,712 KB |
| 最終ジャッジ日時 | 2024-11-24 07:30:46 |
| 合計ジャッジ時間 | 34,630 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 WA * 13 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,20);
if (N==1){
cout<<2<<endl;
return 0;
}
UL n=N/2;
UL i;
UL aw;
aw=4;
while (n>=20){
aw*=P5;
aw%=MOD;
n-=20;
}
for (i=1;i<n;i++){
aw*=5;
aw%=MOD;
}
if (N%2==1){
aw*=3;
aw%=MOD;
}
cout<<aw<<endl;
return 0;
}