#include <iostream>
using namespace std;
int main() {
int n, ans = 1, cnt = 1;
cin >> n;
while (ans < n) {
ans = ans * 10 + 1;
cnt++;
}
while(1){
cout << ans / n;
if(ans % n == 0) break;
ans = (ans % n) * 10 + 1;
cnt++;
}
cout << ' ' << cnt;
return 0; }
PTA L1-46.整除光棍
最新推荐文章于 2024-07-23 22:52:19 发布