結果

問題 No.2043 Ohuton and Makura
ユーザー lam6er
提出日時 2025-03-20 18:40:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 54 ms / 2,000 ms
コード長 279 bytes
コンパイル時間 151 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 62,460 KB
最終ジャッジ日時 2025-03-20 18:40:43
合計ジャッジ時間 1,730 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

A, B, S = map(int, input().split())

max_w = min(A, S)
ans = 0

for w in range(1, max_w + 1):
    product_max = S // w
    k = min(product_max, B)
    if k < 1:
        continue
    sum_h = k * (B + 1) - k * (k + 1) // 2
    num_w = A - w + 1
    ans += num_w * sum_h

print(ans)
0