結果

問題 No.2043 Ohuton and Makura
ユーザー みここ
提出日時 2022-12-14 00:01:10
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 8 ms / 2,000 ms
コード長 306 bytes
コンパイル時間 953 ms
コンパイル使用メモリ 66,264 KB
最終ジャッジ日時 2025-02-09 11:14:02
ジャッジサーバーID
(参考情報)
judge2 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
typedef long long ll;

int main()
{
    ll a, b, s;
    cin >> a >> b >> s;
    ll ans = 0;
    for (ll d = 1; d <= a; d++)
    {
        ll e = max(0ll, b - s / d);
        ans += (a + 1 - d) * (b * (b + 1) / 2 - e * (e + 1) / 2);
    }
    cout << ans << endl;
}
0