結果
問題 |
No.2043 Ohuton and Makura
|
ユーザー |
![]() |
提出日時 | 2023-09-11 04:39:29 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 323 bytes |
コンパイル時間 | 458 ms |
コンパイル使用メモリ | 66,176 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 19:06:11 |
合計ジャッジ時間 | 1,327 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 |
ソースコード
#include <iostream> #include <algorithm> using namespace std; using ll = long long; int main(){ int a, b, s; cin >> a >> b >> s; ll ans = 0; for(int h = 1; h <= b; h++){ int w = min(a, s/h); ans += 1LL*(b-h+1)*(1LL*a*(a+1)/2-1LL*(a-w)*(a-w+1)/2); } cout << ans << endl; return 0; }