結果

問題 No.2452 Incline
ユーザー tailstails
提出日時 2023-09-04 14:06:15
言語 cLay
(20240104-1)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 172 bytes
コンパイル時間 3,123 ms
コンパイル使用メモリ 174,352 KB
実行使用メモリ 5,528 KB
最終ジャッジ日時 2023-09-04 14:06:20
合計ジャッジ時間 4,546 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 101 ms
5,528 KB
testcase_04 AC 96 ms
5,372 KB
testcase_05 AC 95 ms
5,316 KB
testcase_06 AC 96 ms
5,020 KB
testcase_07 AC 95 ms
5,248 KB
testcase_08 AC 91 ms
5,212 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define MD 998244353
ll n;
Mint f(ll x){
	Mint q=x/n;
	return q*(n*(q-1)/2+x%n+1);
}
{
	ll@t;
	rep(t){
		rd(n--);
		ll@m,@l--,@r;
		wt(f(r)-f(l)+f(m+~l)-f(m+~r)+r-l);
	}
}
0