結果

問題 No.2043 Ohuton and Makura
ユーザー Carpenters-CatCarpenters-Cat
提出日時 2022-09-08 00:20:16
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 446 bytes
コンパイル時間 1,858 ms
コンパイル使用メモリ 200,040 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-05-02 21:08:19
合計ジャッジ時間 2,952 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 WA -
testcase_02 AC 5 ms
5,376 KB
testcase_03 AC 4 ms
5,376 KB
testcase_04 AC 7 ms
5,376 KB
testcase_05 AC 5 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 6 ms
5,376 KB
testcase_08 AC 3 ms
5,376 KB
testcase_09 AC 5 ms
5,376 KB
testcase_10 AC 6 ms
5,376 KB
testcase_11 AC 6 ms
5,376 KB
testcase_12 AC 2 ms
5,376 KB
testcase_13 WA -
testcase_14 AC 1 ms
5,376 KB
testcase_15 AC 1 ms
5,376 KB
testcase_16 AC 1 ms
5,376 KB
testcase_17 AC 3 ms
5,376 KB
testcase_18 AC 2 ms
5,376 KB
testcase_19 AC 8 ms
5,376 KB
testcase_20 AC 10 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main () {
    ll a, b, s;
    cin >> a >> b >> s;
    if (a * b < s) {
        cout << 0 << endl;
        return 0;
    }
    ll ans = 0;
    for (ll p = 1; p <= min(a, s); p ++) {
        for (ll q = 1; p * q <= s; q ++) {
            if (q > b) {
                break;
            }
            ans += (a - p + 1) * (b - q + 1);
        }
    }
    cout << ans << endl;
}
0