結果
問題 |
No.3160 Party Game
|
ユーザー |
![]() |
提出日時 | 2025-05-23 20:09:41 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 289 bytes |
コンパイル時間 | 1,999 ms |
コンパイル使用メモリ | 192,760 KB |
実行使用メモリ | 16,072 KB |
最終ジャッジ日時 | 2025-05-27 22:00:24 |
合計ジャッジ時間 | 4,737 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 TLE * 1 -- * 1 |
other | -- * 38 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int m,n; cin >> m >> n; int64_t a=1; int64_t b=1; for(int i=1;i<n+1;i++){ a=a*i; b=b+(m*i); a=a%998244353; b=b&998244353; } int64_t ans=0; while((ans*b-a+998244353)%998244353!=0){ ans++; } cout << ans << endl; }