結果
| 問題 |
No.1476 esreveR dna esreveR
|
| コンテスト | |
| ユーザー |
akane
|
| 提出日時 | 2021-04-16 20:18:58 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 581 bytes |
| コンパイル時間 | 2,002 ms |
| コンパイル使用メモリ | 191,152 KB |
| 最終ジャッジ日時 | 2025-01-20 18:31:32 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 6 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for (int i=0; i < (n); i++)
using namespace std;
using ll = long long;
ll mod=998244353;
long long modpow(long long x, long long n) {
long long ret = 1;
while (n > 0) {
if (n & 1) ret *= x; // n の最下位bitが 1 ならば x^(2^i) をかける
x *= x;
x %= mod;
ret %= mod;
n >>= 1; // n を1bit 左にずらす
}
return ret;
}
int main(){
ios::sync_with_stdio(false);
ll N; cin>>N;
ll num = N/2;
ll ans=1;
ans = modpow(6,num);
cout << ans << endl;
}
akane