1 条题解
- 
  0
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; }Pascal :
var a,b,c:integer; begin for a:=1 to 1000 do for b:=1 to 1000 do if (a+b=1245) and (a*b=359784) and (a>b) then writeln(a,' ',b); end. 
- 1
 
信息
- ID
 - 2226
 - 时间
 - 1000ms
 - 内存
 - 128MiB
 - 难度
 - (无)
 - 标签
 - (无)
 - 递交数
 - 0
 - 已通过
 - 0
 - 上传者