結果
問題 |
No.2452 Incline
|
ユーザー |
![]() |
提出日時 | 2024-05-14 17:40:23 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 354 bytes |
コンパイル時間 | 740 ms |
コンパイル使用メモリ | 76,760 KB |
最終ジャッジ日時 | 2025-02-21 14:03:03 |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | WA * 8 |
ソースコード
#include <iostream> #include <cmath> using namespace std; using ll = long long; const ll MOD = 998244353; ll solve() { ll N, M, L, R; cin >> N >> M >> L >> R; ll ans = (R - L + 1) % MOD; ans *= ((M - L) / (N - 1) + 1) % MOD; ans %= MOD; return ans; } int main() { int T; cin >> T; while(T--) solve(); return 0; }