#include<iostream>
#include<string>
#include<vector>
#define maxNum 100
using namespace std;
void calculate(
int n)
{
for (
int i =
0; i <= n /
5; ++i)
{
for (
int j =
0; j <= n /
3; ++j)
{
for (
int k =
0; k <= n; ++k)
{
if ((i *
5 + j *
3 + k /
3 == n) && (i + j + k == n) && (k %
3 ==
0))
{
cout << i <<
" " << j <<
" " << k << endl;
}
}
}
}
}
int main()
{
int x;
cin >> x;
calculate(
100);
return 0;
}
转载请注明原文地址: https://ju.6miu.com/read-21258.html