結果

問題 No.1803 Remainder of Sum
ユーザー ytftytft
提出日時 2022-02-16 01:00:24
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 128 bytes
コンパイル時間 295 ms
コンパイル使用メモリ 87,104 KB
実行使用メモリ 77,720 KB
最終ジャッジ日時 2023-09-11 17:04:47
合計ジャッジ時間 4,188 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,252 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 321 ms
77,256 KB
testcase_08 WA -
権限があれば一括ダウンロードができます

ソースコード

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