結果
| 問題 |
No.1348 Split Tile
|
| コンテスト | |
| ユーザー |
Nachia
|
| 提出日時 | 2021-01-16 14:58:12 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 10 ms / 2,000 ms |
| コード長 | 364 bytes |
| コンパイル時間 | 1,959 ms |
| コンパイル使用メモリ | 194,120 KB |
| 最終ジャッジ日時 | 2025-01-17 23:26:28 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 26 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:13:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
13 | scanf("%d",&N);
| ~~~~~^~~~~~~~~
ソースコード
#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;
}
Nachia