結果
問題 | No.2043 Ohuton and Makura |
ユーザー |
|
提出日時 | 2022-08-24 08:39:50 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 818 ms / 2,000 ms |
コード長 | 357 bytes |
コンパイル時間 | 1,567 ms |
コンパイル使用メモリ | 171,048 KB |
実行使用メモリ | 58,752 KB |
最終ジャッジ日時 | 2024-10-11 18:45:22 |
合計ジャッジ時間 | 10,340 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ long long A, B, S, ans = 0; cin >> A >> B >> S; vector<vector<int>> tb(S + 1); for(int i = 1; i <= S; i++){ for(int j = i; j <= S; j+=i) tb[j].emplace_back(i); for(auto &&v:tb[i]) ans += max(0ll, A - v + 1) * max(0ll, B - i / v + 1); } cout << ans << endl; }