結果
| 問題 |
No.2452 Incline
|
| コンテスト | |
| ユーザー |
srjywrdnprkt
|
| 提出日時 | 2024-05-14 17:43:23 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 365 bytes |
| コンパイル時間 | 647 ms |
| コンパイル使用メモリ | 77,248 KB |
| 最終ジャッジ日時 | 2025-02-21 14:03:08 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 8 |
ソースコード
#include <iostream>
#include <cmath>
using namespace std;
using ll = long long;
const ll MOD = 998244353;
void 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;
cout << ans << endl;
}
int main() {
int T;
cin >> T;
while(T--) solve();
return 0;
}
srjywrdnprkt