結果

問題 No.1348 Split Tile
ユーザー 👑 NachiaNachia
提出日時 2021-01-16 14:58:12
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 9 ms / 2,000 ms
コード長 364 bytes
コンパイル時間 2,492 ms
コンパイル使用メモリ 199,904 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2023-08-18 12:17:27
合計ジャッジ時間 3,509 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 7 ms
9,920 KB
testcase_04 AC 7 ms
7,980 KB
testcase_05 AC 4 ms
4,456 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 9 ms
10,848 KB
testcase_08 AC 7 ms
8,508 KB
testcase_09 AC 6 ms
7,780 KB
testcase_10 AC 7 ms
10,060 KB
testcase_11 AC 3 ms
4,380 KB
testcase_12 AC 5 ms
6,940 KB
testcase_13 AC 7 ms
8,840 KB
testcase_14 AC 5 ms
6,956 KB
testcase_15 AC 7 ms
9,072 KB
testcase_16 AC 5 ms
6,788 KB
testcase_17 AC 4 ms
5,152 KB
testcase_18 AC 6 ms
8,196 KB
testcase_19 AC 5 ms
6,496 KB
testcase_20 AC 6 ms
6,780 KB
testcase_21 AC 5 ms
5,944 KB
testcase_22 AC 8 ms
9,992 KB
testcase_23 AC 8 ms
10,608 KB
testcase_24 AC 8 ms
10,124 KB
testcase_25 AC 9 ms
11,008 KB
testcase_26 AC 8 ms
10,140 KB
testcase_27 AC 9 ms
10,732 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
using LL=long long;
using ULL=unsigned long long;
#define rep(i,n) for(int i=0; i<(n); i++)

const ULL M=998244353;

int N;
vector<ULL> F;

int main(){
  scanf("%d",&N);
  F.resize(N+1); F[0]=1; rep(i,N) F[i+1]=F[i]*(i+1)%M;
  ULL ans=(1+(N+1)*(M/3+1)%M)*F[N]%M*(N-1)%M*(M/2+1)%M;
  printf("%llu\n",ans);
  return 0;
}
0