【Codeforces Round #434 (Div. 2) A】k-rounding
Codeforces div round
2023-09-14 09:03:49 时间
【链接】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; }
相关文章
- Codeforces Round #806 (Div. 4)(A~F)
- Codeforces Round #813 (Div. 2)(A~C)
- Codeforces Round #825 (Div. 2) (A~C1)
- 【题解】codeforces-1194B
- Codeforces Global Round 23(A~C)
- Codeforces 456 A. Laptops「建议收藏」
- Codeforces Round#806(Div.4) 题解
- CodeForces - 999B Reversing Encryption
- A. The Fair Nut and Elevator (Codeforces Round #526 (Div. 2))
- 深入理解MySQL中的DIV函数(mysql中div)