#include <iostream>
using namespace std;
//二維數組
int main()
{
int n;cin>>n;
int x=0,cnt=0;
while(x<n){
x=x*10+1;
cnt++;
}
while(1)
{
if(x%n==0){
cout<<x/n;
break;
}
else{
cout<<x/n;
x=x%n;
x=x*10+1;
cnt++;
}
}
cout<<" "<<cnt;
return 0;
}
7-93 整除光棍 【模擬除法】
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.