#include<bits/stdc++.h>
using namespace std;
vector<int>a;
int b[6] = {1,2,5,7,10,17};
int main()
{
int i, n;
while(cin >> n)
{
for(i=6-1;i>=0;i--)
{
while(b[i] <= n)
{
n -= b[i];
a.push_back(b[i]);
}
}
for(i=0;i<a.size();i++)
cout << a[i] << " ";
cout << endl;
a.clear();
}
return 0;
}
using namespace std;
vector<int>a;
int b[6] = {1,2,5,7,10,17};
int main()
{
int i, n;
while(cin >> n)
{
for(i=6-1;i>=0;i--)
{
while(b[i] <= n)
{
n -= b[i];
a.push_back(b[i]);
}
}
for(i=0;i<a.size();i++)
cout << a[i] << " ";
cout << endl;
a.clear();
}
return 0;
}
Comments
Post a Comment