4 solutions

  • 4
    @ 2024-5-15 14:04:07
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	//枚举a和b 
    	for(int a=1;a<=9;a++)
    	{
    		for(int b=0;b<=9;b++)
    		{
    			int t=a*1000+a*100+b*10+b;
    			int k=sqrt(t);
    			if(k*k==t) //说明小数转整数的时候没有丢失精度 
    			{
    				cout<<t<<endl;
    			}
    		} 	
    	}
    	return 0;
    }
    
    • 3
      @ 2024-10-26 9:33:01

      直接cout7744

      • @ 2024-12-1 15:50:36

        代码如下

        #include<bits/stdc++.h>
        using namespace std;
        int main()
        {
          cout<<"7744";
        	return 0;
        }
        
    • 1
      @ 2024-12-1 15:47:26
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
      	//枚举a和b 
      	for(int a=1;a<=9;a++)
      	{
      		for(int b=0;b<=9;b++)
      		{
      			int t=a*1000+a*100+b*10+b;
      			int k=sqrt(t);
      			if(k*k==t) //说明小数转整数的时候没有丢失精度 
      			{
      				cout<<t<<endl;
      			}
      		} 	
      	}
      	return 0;
      }
      
      
      • 0
        @ 2025-7-11 10:18:40
        #include<bits/stdc++.h>
        using namespace std;
        int main()
        {
        	for(int i=1;i<=9999;i++){
        	int g=i%10;
        	int s=i/10%10;
        	int b=i/100%10;
        	int q=i/1000;
        	int t=sqrt(i);
        	if(q==b&&s==g&&t*t==i){
        		cout<<i;
        	}
        	}
        	return 0;
        }
        
        
        
        • 1

        Information

        ID
        53
        Time
        1000ms
        Memory
        256MiB
        Difficulty
        1
        Tags
        (None)
        # Submissions
        92
        Accepted
        51
        Uploaded By