多少个1可以被47整除
来源:百度知道 编辑:UC知道 时间:2024/05/20 00:42:44
多少个1可以被47整除
46个.
附C代码
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
unsigned n, a, total;
while(cin>>n)
{
a = total = 1;
a %= n;
while(a)
{
a = a * 10 + 1;
total++;
a %= n;
}
cout<<total<<endl;
}
return 0;
}
47个吧?