結果
| 問題 | No.557 点対称 |
| ユーザー |
|
| 提出日時 | 2019-08-29 18:23:39 |
| 言語 | C++17 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 819µs | |
| コード長 | 436 bytes |
| 記録 | |
| コンパイル時間 | 1,185 ms |
| コンパイル使用メモリ | 213,988 KB |
| 実行使用メモリ | 9,908 KB |
| 最終ジャッジ日時 | 2026-10-24 01:54:31 |
| 合計ジャッジ時間 | 3,401 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int mpow(int a,ll b,int m) {
int ans=1;
while (b) {
if (b&1)
ans=ans*(ll)a%m;
a=(ll)a*a%m;
b>>=1;
}
return ans;
}
int main() {
ll n;
cin>>n;
if (n==1)
cout<<2<<endl;
else {
int mod=1e9+7;
int a=n%2?12:4;
cout<<(ll)a*mpow(5,n/2-1,mod)%mod<<endl;
}
return 0;
}