結果
問題 |
No.2079 aaabbc
|
ユーザー |
![]() |
提出日時 | 2022-10-24 21:58:11 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 360 bytes |
コンパイル時間 | 2,004 ms |
コンパイル使用メモリ | 193,168 KB |
最終ジャッジ日時 | 2025-02-08 12:25:30 |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 11 |
ソースコード
#include <bits/stdc++.h> using namespace std; constexpr int mod = 998244353; long long modpow(long long a,long long b) { long long ans = 1; while(b) { if(b & 1) { (ans *= a) %= mod; } (a *= a) %= mod; b /= 2; } return ans; } int main() { int n; cin >> n; cout << modpow(3,n) << endl; }