Files
python/TangDou/XiTi/1459_2.cpp
HuangHai 1f397eca87 'commit'
2025-08-30 18:35:01 +08:00

16 lines
382 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include <bits/stdc++.h>
using namespace std;
int main() {
int n, a, b, c, count = 0; //a:10的个数b:20的个数c:50的个数
cin >> n; //n元钞票
for (c = 0; c <= 2 * n / 100; c++)
for (b = 0; b <= 5 * n / 100; b++) {
if (c * 50 + b * 20 <= n)
count++;
}
cout << count << endl;
return 0;
}