#include <iostream>
using namespace std;
int main()
{
int x, count = 1;
cin >> x;
int n = 1;
while (n < x)
{
n = n * 10 + 1;
count++;
}
while (true)
{
cout << n / x;
n %=x;
if (n == 0)
break;
else
{
n = n* 10 + 1;
count++;
}
}
cout << " " << count << endl;
system("pause");
return 0;
}
L1-046 整除光棍(模拟竖式除法)
最新推荐文章于 2024-07-04 16:16:29 发布