2 条题解

  • 0
    @ 2025-4-23 20:34:30
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
        for(int a=1;a<=1000;a++){
            for(int b=1;b<=1000;b++){
                if(a+b==1245 and a*b==359784){
                    cout<<b<<" "<<a;
                    return 0;
                }
            }
        }
        return 0;
    }
    
    • 0
      @ 2024-12-24 10:06:15

      C++ :

      #include<cstdio>
      using namespace std;
      int main()
      {
          int a,b;
          for(int a=1;a<=1000;a++)
          {
      		for(int b=1;b<=a;b++)
      		{
      			if(a+b==1245&&a*b==359784)
      			{
      				printf("%d %d",a,b);
      			}
      		}
      	}
      	return 0;
      }
      
      • 1

      信息

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