#P1401. [入门赛 #18] 禁止在 int 乘 int 时不开 long long
[入门赛 #18] 禁止在 int 乘 int 时不开 long long
Problem Description
In contests, it is very important to analyze the value range of variables clearly according to the Constraints. When an int variable is multiplied by an int variable, it is often possible to exceed the value range that int can represent.
Now, given two int variables and their value ranges, determine whether the value of may exceed the range that int can represent.
Hint: The range that
intcan represent is , i.e. . That is, the minimum value representable byintis , and the maximum value is .
Input Format
The input has two lines.
The first line contains two integers , indicating that the value range of variable is .
The second line contains two integers , indicating that the value range of variable is .
Output Format
Output one line with one string:
- If it may exceed, output
long long int. - If it will not exceed, output
int.
1 5
1 5
int
-2147483647 2147483647
-2147483647 2147483647
long long int
Hint
Constraints
- For of the testdata, , .
- For of the testdata, , .
Translated by ChatGPT 5