rz求助92分,3#过不去
查看原帖
rz求助92分,3#过不去
112631
Lovable_Wind楼主2020/9/28 22:27
#include<bits/stdc++.h>
using namespace std;
long long k,x;
int GetLong(long long x){
	long long tmp=x,ans=0;
	while(tmp!=0){
		tmp/=10;
		ans++;
	}
	return ans;
}
int main()
{
	cin>>k>>x;
	if (k<=18){
		cout<<(long long)(pow(10,k)+x);
		return 0;
	}
	k-=GetLong(x);
	cout<<1;
	for (int i=1;i<=k;i++){
		cout<<0;
	}
	if (x!=0)
		cout<<x<<endl;
}
2020/9/28 22:27
加载中...