8 条题解

  • 6
    @ 2023-4-19 20:12:34

    正常解法:

    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        int x=30;
        while(++x)
        {
            if(x*x/1000==x*x/100%10&&x*x/10%10==x*x%10&&x*x/1000!=x*x%10)
            {
                cout<<x*x;
                break;
            }
        }
        return 0;
    }
    

    逃课:

    #include <bits/stdc++.h> 
    using namespace std;
    int main()
    {
        cout<<7744;
        return 0;
    }
    • 1
      @ 2024-5-14 15:58:26

      #include <bits/stdc++.h> using namespace std; int main() { cout<<7744; return 0; }

      • @ 2024-5-14 15:59:09

        这是正确的,不信试试

    • 0
      @ 2023-10-3 21:44:22
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
          for(int i=1000;i<=9999;i++)
          {
              int m=sqrt(i);
              if(i/100%11==0&&i%100%11==0&&sqrt(i)==m )
              {
                  cout<<i<<" ";
              }
          }
          return 0;
      }
      
    • 0
      @ 2023-10-3 21:35:19

      #include <bits/stdc++.h> using namespace std; int main() { cout<<7744; return 0; }

      • 0
        @ 2023-7-19 19:56:18
        #include <bits/stdc++.h>
        using namespace std;
        int main(){
            cout << 7744;
        }
        
        • 0
          @ 2023-7-19 19:55:35
          #include <bits/stdc++.h>
          using namespace std;
          int main(){
              int n;
              for (int i = 10; i <= 100; i++){
                  n = i * i;
                  if (n / 1000 == n / 100 % 10 && n / 10 % 10 == n % 10){
                      cout << n;
                      break;
                  }
              }
          }
          
          • 0
            @ 2023-2-28 19:16:39
            #include <bits/stdc++.h> 
            using namespace std;
            int main()
            {
                cout<<7744;
                return 0;
            }
            
            • 0
              @ 2023-1-30 15:17:36
              #include<bits/stdc++.h>
              using namespace std;
              /*
              思路:遍历i范围的4位整数,i满足3个条件,分别判断 
              */
              int main()
              {
              	int i;
              	//循环范围在4位数以内
              	for(i = 1000; i <= 9999; i++){
              		//前两位数字时相同的,后两位数字时相同的
              		if(i/1000 == i/100%10 && i%100/10 == i%10){
              			//四位的车号刚好是一个整数的平方
              			if(sqrt(i) == int(sqrt(i))){
              				cout << i << endl;
              			} 
              		} 
              	}  
              	return 0;
              }
              
              
              • 1

              信息

              ID
              253
              时间
              1000ms
              内存
              16MiB
              难度
              2
              标签
              递交数
              162
              已通过
              105
              上传者