結果
問題 |
No.2043 Ohuton and Makura
|
ユーザー |
![]() |
提出日時 | 2025-03-20 20:18:10 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 50 ms / 2,000 ms |
コード長 | 279 bytes |
コンパイル時間 | 160 ms |
コンパイル使用メモリ | 82,532 KB |
実行使用メモリ | 61,120 KB |
最終ジャッジ日時 | 2025-03-20 20:19:11 |
合計ジャッジ時間 | 1,733 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
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)