結果

問題 No.2079 aaabbc
ユーザー StstoneStstone
提出日時 2022-10-15 17:28:32
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,121 bytes
コンパイル時間 3,046 ms
コンパイル使用メモリ 220,972 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-09 02:54:56
合計ジャッジ時間 3,868 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 1 ms
4,384 KB
testcase_12 AC 2 ms
4,376 KB
testcase_13 AC 1 ms
4,376 KB
testcase_14 AC 2 ms
4,380 KB
testcase_15 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma GCC optimize("Ofast")
#pragma GCC optimize(1)
#pragma GCC optimize(2)
#pragma GCC optimize(3)
#pragma GCC target("popcnt")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef string str;
typedef pair<ll,ll> pii;
#define F first
#define S second
#define pb push_back
#define pq priority_queue
#define all(x) (x).begin(),(x).end()
#define bug(x) cerr << (x) << '\n'
#define yn(x) cout << (x==1?"Yes\n":"No\n")
#define PI 3.14159265358979323
#define Ststone ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
const ll max_n=1e5+20,max_int=2147483647,mod1=1e9+7,mod2=998244353;
ll dx[8] = {1,0,0,-1,1,1,-1,-1};
ll dy[8] = {0,1,-1,0,1,-1,1,-1};
ll t,n,q,m,k,a,b,c,d,e,f,x,sum,ans;
vector<ll> v,v1,v2;
char cc;

ll modpow(ll a, ll b) {
  a %= 998244353;
  ll c = 1;
  while (b > 0) {
    if (b & 1) c = (c * a) % 998244353;
    a = (a * a) % 998244353;
    b >>= 1;
  }
  return c;
}

void solve(){
    cin >> n;
    cout << modpow(3,n);
}



int main(){
    Ststone;
    
    //cin >> t;
    t = 1;
    for(ll i=1;i<=t;i++){
        //cout << "Case #"<<i<<": ";
        solve();
    }
}

/*
*/
0