【Codeforces Round #434 (Div. 2) A】k-rounding
【链接】h在这里写链接
【题意】
在这里写题意
【题解】
转换一下就是求n和10^k的最小公倍数。
【错的次数】
0
【反思】
在这了写反思
【代码】
#include <bits/stdc++.h>
using namespace std;
long long n, k;
long long temp;
long long gcd(long long a, long long b) {
if (b == 0)
return a;
else
return gcd(b, a%b);
}
int main() {
//freopen("F:\\rush.txt", "r", stdin);
ios::sync_with_stdio(0), cin.tie(0);
cin >> n >> k;
temp = 1;
for (int i = 1; i <= k; i++)
temp = temp * 10;
cout << n*temp / gcd(temp, n) << endl;
return 0;
}
浙公网安备 33010602011771号