95pts是为啥
查看原帖
95pts是为啥
1363886
WEIbw666楼主2025/1/19 09:35
#include <bits/stdc++.h>
using namespace std;
int main(){
	int x, y, z, n, m, cnt = 0;
	cin >> x >> y >> z >> n >> m;
	for (int i = 0; i <= m; i++){
	    for (int j = 0; j <= m; j++){
	        int k = m - i - j;
	        if (x * i + j * y + k / z == n && k % z == 0){
	            cnt++;
	        }
	    }
	}
	cout << cnt << endl;
	return 0;
}
2025/1/19 09:35
加载中...