結果
| 問題 |
No.1803 Remainder of Sum
|
| コンテスト | |
| ユーザー |
prussian_coder
|
| 提出日時 | 2022-01-16 19:13:00 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 161 bytes |
| コンパイル時間 | 1,839 ms |
| コンパイル使用メモリ | 82,036 KB |
| 実行使用メモリ | 76,628 KB |
| 最終ジャッジ日時 | 2024-11-23 11:58:50 |
| 合計ジャッジ時間 | 5,402 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 8 |
ソースコード
T=int(input())
for _ in range(T):
a,b=map(int,input().split())
m=min(a,b//2)
if a>=b:
print(m*(m+1)//2)
else:
print((m+1)*m//2-3)
prussian_coder