結果

問題 No.1803 Remainder of Sum
ユーザー ytft
提出日時 2022-02-16 01:00:24
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 128 bytes
コンパイル時間 258 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 77,056 KB
最終ジャッジ日時 2024-06-29 07:10:27
合計ジャッジ時間 4,604 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 1 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

T=int(input())
for i in range(T):
	N,M=map(int,input().split())
	if N>M:
		print(M//2)
	else:
		print((M-N+2)*(M-N+3)//2-3+M//2)
0