#include<stdio.h>
int main(){
int s=0;
int a=0,t,count=1,b=0;
scanf("%d",&a);
//a=1;b=11;c=111;
//a变成b a*1+1; b变成c b*10+1;
t=1;///s*a=t
while(a>t){
t=t*10+1;
count++;
}
while(1){
s=t/a;
printf("%d",s);
t=t%a;
if(t!=0){
t=t*10+1;//这个步骤是为什么
count++;
}else{
break;
}
}
printf(" %d",count);
return 0;}
借鉴的他人,有一步不太能看得懂