結果
| 問題 | No.2079 aaabbc |
| コンテスト | |
| ユーザー |
rieaaddlreiuu
|
| 提出日時 | 2022-10-22 09:03:58 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 520 bytes |
| 記録 | |
| コンパイル時間 | 1,080 ms |
| コンパイル使用メモリ | 182,764 KB |
| 実行使用メモリ | 15,944 KB |
| 最終ジャッジ日時 | 2026-03-22 14:31:50 |
| 合計ジャッジ時間 | 19,071 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 5 |
| other | RE * 6 TLE * 5 |
ソースコード
#include <bits/stdc++.h>
#include <vector>
#include <tuple>
#include <regex>
#include <string>
#include <stack>
#include <algorithm>
using namespace std;
int main(){
int N;
int ord = 0;
long ans = 1;
scanf("%d",&N);
N = N % 998244352;
for(int i=0;i<N;i++){
ans = (ans * 3) % 998244353;
if(ans == 1){
ord = i;
break;
}
}
N = N % ord;
ans = 1;
for(int i=0;i<N;i++){
ans = (ans * 3) % 998244353;
}
printf("%ld",ans);
}
rieaaddlreiuu