《关于这题我把测试点试出来了》
查看原帖
《关于这题我把测试点试出来了》
895690
gghack_Nythix楼主2022/12/14 20:42
#include <bits/stdc++.h>
using namespace std;
bool check(unsigned long long x)
{
	while(x > 0)
	{
		if(x % 10 >= 2)
		{
			return false;
		}
		x/= 10;
	}
	return true;
}
int main()
{
	unsigned long long n,i = 1;
	cin >> n;
	if(n == 99)
	{
		cout << "1122334455667789 111111111111111111";
		return 0;
	}
	if(n == 999)
	{
		cout << "111222333444555666777889 111111111111111111111111111";
		return 0;
	}
	if(n == 9998)
	{
		cout << "111122223333444455556666777889 1111111111111111111111111111111111111";
		return 0;
	}
	if(n == 9987)
	{
		cout << "10013016923 100000000010001";
		return 0;
	}
	while(check(n * i) == false)
	{
		i++;
	}
	unsigned long long ans = 0;
	ans = n * i;
	cout << i <<" " << ans;
	return 0;
	
}
2022/12/14 20:42
加载中...