結果

問題 No.2079 aaabbc
ユーザー GetDigit()GetDigit()
提出日時 2022-10-22 09:20:12
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 490 ms / 2,000 ms
コード長 436 bytes
コンパイル時間 1,379 ms
コンパイル使用メモリ 164,208 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-14 05:37:15
合計ジャッジ時間 5,121 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 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 53 ms
4,376 KB
testcase_06 AC 334 ms
4,376 KB
testcase_07 AC 102 ms
4,376 KB
testcase_08 AC 401 ms
4,380 KB
testcase_09 AC 106 ms
4,376 KB
testcase_10 AC 309 ms
4,380 KB
testcase_11 AC 221 ms
4,376 KB
testcase_12 AC 381 ms
4,380 KB
testcase_13 AC 438 ms
4,376 KB
testcase_14 AC 31 ms
4,380 KB
testcase_15 AC 490 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

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