結果
問題 | No.2043 Ohuton and Makura |
ユーザー | bit_kyopro |
提出日時 | 2022-08-19 22:14:44 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 11 ms / 2,000 ms |
コード長 | 394 bytes |
コンパイル時間 | 699 ms |
コンパイル使用メモリ | 73,124 KB |
最終ジャッジ日時 | 2025-01-31 01:15:25 |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
#include <iostream> #include <string> #include <set> #include <algorithm> using namespace std; using ll = long long; int main() { ll W, H, S; cin >> W >> H >> S; ll ans = 0; for (int w=1; w<=min(S, W); w++) { ll res = 0; for (int h=1; h<=min(H, S/w); h++) { res += H - h + 1; } ans += res*(W - w + 1); } cout << ans << endl; }