cf434 div.2 A. k-rounding
来源:互联网 发布:linux zip命令 密码 编辑:程序博客网 时间:2024/05/16 06:10
原题
求n和10^k的最小公倍数;
n*10^k/gcd(n,10^k);
#include<cstdio>
using namespace std;
long long gcd(long x,long y)
{
return (y==0)?x:gcd(y,x%y);
}
int main()
{
long long n;
int k;
scanf("%lld%d",&n,&k);
long long sum=1;
for(int i=1;i<=k;i++)
sum=sum*10;
printf("%lld",sum*n/gcd(sum,n));
return 0;
}
阅读全文
0 0
- cf434 div.2 A. k-rounding
- Codeforces Round #451 (Div. 2) A. Rounding
- codeforces 861A k-rounding
- Codeforces 858A k-rounding
- codeforces 858 A k-rounding(数学)
- Codeforces 858A. k-rounding 数论
- A. Rounding
- Codeforces #402 (Div. 2) B. Weird Rounding
- Codeforces Round #204 (Div. 1) A. Jeff and Rounding
- Codeforces Round #204 (Div. 2) C. Jeff and Rounding
- Codeforces Round #204 (Div. 2) C Jeff and Rounding
- Codeforces Round #402 (Div. 2) B. Weird Rounding
- Codeforces Round #402 (Div. 2) B. Weird Rounding
- Codeforces Round #402 (Div. 2)B. Weird Rounding【暴力枚举】
- Codeforces Round #402 (Div. 2) B. Weird Rounding(爆搜)
- Codeforces Round #402 (Div. 2) B. Weird Rounding
- Codeforces 898A. Rounding
- Codeforces 898 A Rounding
- POJ
- MapReduce -- 统计天气信息
- android 5.0修改插电显示电池百分比,拔掉不显示问题
- 最长连续递增子序列
- 各大地图API关于逆地理位置编码
- cf434 div.2 A. k-rounding
- 创建多线程有几种方法?如何创建线程?
- 71. Simplify Path
- [POJ1155]TELE(树形dp)
- VS2017+Opencv3.3+Opencv_contribute编译
- 01背包和完全背包
- face-alignment:用 pytorch 实现的 2D 和 3D 人脸对齐库
- ARM裸机编程需要知道的汇编知识1---可编程逻辑器件
- power