結果
| 問題 |
No.2043 Ohuton and Makura
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-09-24 20:02:39 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 19 ms / 2,000 ms |
| コード長 | 276 bytes |
| コンパイル時間 | 2,112 ms |
| コンパイル使用メモリ | 192,988 KB |
| 最終ジャッジ日時 | 2025-02-07 14:32:01 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
long long A,B,S;
cin>>A>>B>>S;
long long ans=0;
for(int i=1;i<=A;i++){
long long C=min(B,S/i);
ans+=(C*(2*B-C+1)/2)*(A-i+1);
}
cout<<ans<<'\n';
}