結果

問題 No.2452 Incline
ユーザー 憩いの場
提出日時 2023-09-01 22:24:36
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 429 bytes
コンパイル時間 3,109 ms
コンパイル使用メモリ 132,328 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2025-01-03 09:29:55
合計ジャッジ時間 6,424 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 1 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
#include<atcoder/all>

using namespace atcoder;
using namespace std;

int main( void )
{
    int T;
    cin >> T;

    long long N, M, L, R;
    while( T-- > 0 )
    {
        cin >> N >> M >> L >> R;
        modint998244353 ans = 0;
        ans = R - L + ( long long )1;
        M /= ( N - 1 ), M++, M %= 998244353;
        ans *= M;

        cout << ans.val() << endl;
    }

    return 0;
}
0