#include<bits/stdc++.h>
using namespace std;
#define int long long
#define endl '\n'
#define inf 1e18
const int mod=1e9+7;
const int N=2e5+5;
int n,m,p,x;
void solve(){
cin>>n>>m>>p>>x;
int ans=0;
for(int i=1;i<=n;i++){
for(int j=1;j<=m;j++){
if(i*j>=x||(2*i+2*j)*p+i*j<x) continue;
if((x-i*j)%(2*i+2*j)==0) ans++;
}
}
cout<<ans;
}
signed main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int tt=1;
// cin>>tt;
while(tt--) solve();
return 0;
}
标签:周赛,39,const,int,tt,cin,long,筛求,define
From: https://blog.csdn.net/JungleZRD/article/details/137518309