結果

問題 No.2043 Ohuton and Makura
ユーザー niboseanibosea
提出日時 2022-08-19 21:59:11
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 17 ms / 2,000 ms
コード長 1,417 bytes
コンパイル時間 5,137 ms
コンパイル使用メモリ 253,804 KB
実行使用メモリ 8,444 KB
最終ジャッジ日時 2024-04-17 00:40:54
合計ジャッジ時間 5,968 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4 ms
8,320 KB
testcase_01 AC 4 ms
8,192 KB
testcase_02 AC 10 ms
8,320 KB
testcase_03 AC 10 ms
8,320 KB
testcase_04 AC 15 ms
8,112 KB
testcase_05 AC 11 ms
8,152 KB
testcase_06 AC 6 ms
8,192 KB
testcase_07 AC 15 ms
8,444 KB
testcase_08 AC 7 ms
8,320 KB
testcase_09 AC 12 ms
8,320 KB
testcase_10 AC 13 ms
8,320 KB
testcase_11 AC 11 ms
8,320 KB
testcase_12 AC 5 ms
8,192 KB
testcase_13 AC 15 ms
8,112 KB
testcase_14 AC 4 ms
8,108 KB
testcase_15 AC 5 ms
8,192 KB
testcase_16 AC 5 ms
8,320 KB
testcase_17 AC 15 ms
8,320 KB
testcase_18 AC 17 ms
8,320 KB
testcase_19 AC 16 ms
8,320 KB
testcase_20 AC 16 ms
8,320 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0