結果
| 問題 |
No.2043 Ohuton and Makura
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-08-19 21:59:11 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 11 ms / 2,000 ms |
| コード長 | 1,417 bytes |
| コンパイル時間 | 4,039 ms |
| コンパイル使用メモリ | 250,992 KB |
| 最終ジャッジ日時 | 2025-01-31 01:05:40 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 18 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
typedef pair<ll,ll> P;
#define SORT(a) sort((a).begin(),(a).end())
#define REV(a) reverse((a).begin(),(a).end())
#define For(i, a, b) for(ll i = (a) ; i < (b) ; ++i)
#define rep(i, n) For(i, 0, n)
#define debug(x) cerr << #x << " = " << (x) << endl;
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
void coY() {cout <<"Yes"<<endl;}
void coN(){cout <<"No"<<endl;}
void coT() {cout <<"Takahashi"<<endl;}
void coA(){cout <<"Aoki"<<endl;}
void mswap(ll &a, ll &b){ if(a >= b) swap(a,b); }
void rswap(ll &a, ll &b){ if(a <= b) swap(a,b); }
const ll dy[] = {0,0,1,-1};
const ll dx[] = {1,-1,0,0};
const ll mod = 1e9+7;
const ll MOD = 998244353;
using mint = modint998244353;
const double PI=3.14159265358979323846;
const ll inf = 1001001001;
const ll INF = 9'000'000'000'000'000'000;
vector<ll> to[200'005];
//Write From this Line
int main()
{
ll H, W, S;
cin >> H>> W>> S;
ll ans = 0;
for(ll h = 1; h <= S; h++){
ll w = 1;
while(h*w <= S){
// h * wの枕はnanko??
ll tate = (H-h+1);
ll yoko = (W-w+1);
if(tate >= 0 && yoko >=0){
ll now = tate * yoko;
ans += now;
}
w += 1;
}
}
cout << ans << endl;
}