求救!18AC,5WA,其他TLE
查看原帖
求救!18AC,5WA,其他TLE
1082431
Yangjackys楼主2024/4/1 20:20
#include <string>
#include <iostream>
using namespace std;
long long x1 , x2 , y1 , y2 ,  ans1 = 0 , ans2 = 0 ; 
int main() {
	cin >> x1 >> x2 >> y1 >> y2 ;
	for(int i = x1 ; i <= x2 ; i++){
		for(int j = y1 ; j <= y2 ; j++){
			if(i * j > ans1){
				ans1 = i * j ;
			}
			if(i * j < ans2){
				ans2 = i * j ;
			}
		}
	}
	if(ans1 > 2147483647 or ans2 < -2147483647){
		cout << "long long int" ;
	}
	else{
		cout << "int" ; 
	}
    return 0;
}
2024/4/1 20:20
加载中...