結果
| 問題 | No.1803 Remainder of Sum |
| コンテスト | |
| ユーザー |
prussian_coder
|
| 提出日時 | 2022-01-16 19:13:00 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 161 bytes |
| 記録 | |
| コンパイル時間 | 208 ms |
| コンパイル使用メモリ | 85,248 KB |
| 実行使用メモリ | 81,536 KB |
| 最終ジャッジ日時 | 2026-05-17 05:47:50 |
| 合計ジャッジ時間 | 4,073 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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