1 条题解

  • 0
    @ 2024-12-24 10:06:06

    C++ :

    #include<iostream>
    using namespace std;
    bool find(int x)	//判断是否满足条件
    {
    	while (x)
    	{
    		int t=x%10;
    		if (t>=2) return false;
    		x/=10;
    	}
    	return true;
    }
    int main()
    {
    	int n,m;
    	cin>>n;
    	for (m=1; m*n<=2000000000; m++)
    		if (find(m*n)) break;
    	if (m*n>2000000000) cout<<"No found\n";
    	else cout<<m<<endl;
    	return 0;
    }
    
    • 1

    信息

    ID
    1911
    时间
    1000ms
    内存
    128MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者