#include<bits/stdc++.h> using namespace std; int main() { int x,c=1; cin>>x; long long t=1; while(t<x) { t=t*10+1; c++; } while(1) { cout<<(t/x); t%=x; if(t==0) break; t=t*10+1; c++; } // cout<<"t:"<<t<<endl; cout<<" "<<c; return 0; }
#include<bits/stdc++.h> using namespace std; int main() { int x,c=1; cin>>x; long long t=1; while(t<x) { t=t*10+1; c++; } while(1) { cout<<(t/x); t%=x; if(t==0) break; t=t*10+1; c++; } // cout<<"t:"<<t<<endl; cout<<" "<<c; return 0; }