結果

問題 No.2079 aaabbc
ユーザー rieaaddlreiuu
提出日時 2022-10-22 09:20:12
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 490 ms / 2,000 ms
コード長 436 bytes
コンパイル時間 1,483 ms
コンパイル使用メモリ 165,232 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-01 13:13:35
合計ジャッジ時間 5,024 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <vector>
#include <tuple>
#include <regex>
#include <string>
#include <stack>
#include <algorithm>
using namespace std;

int main(){
    int N;
    long ans = 1;
    scanf("%d",&N);
    int N_mod = N % 10;
    N = (N - (N % 10))/10;
    for(int i=0;i<N;i++){
        ans = (ans * 59049) % 998244353;
    }
    for(int i=0;i<N_mod;i++){
        ans = (ans * 3) % 998244353;
    }
    printf("%d",ans);
}
0