#include <iostream> using namespace std; int main() { int n; while(cin>>n) { while(n>1) { cout<<n<<"-"; if(n%2==0) n=n/2; else n=n+1; } cout<<"1"<<endl; } return 0; }
#include <iostream> using namespace std; int main() { int n; while(cin>>n) { while(n>1) { cout<<n<<"-"; if(n%2==0) n=n/2; else n=n+1; } cout<<"1"<<endl; } return 0; }