[语言月赛 202312] 禁止在 int 乘 int 时不开 long long

Luogu
IDLGB3906
Time100ms
Memory512MB
DifficultyP1
2023O2优化分支结构语言月赛
在比赛中,根据数据范围,分析清楚变量的取值范围,是非常重要的。int 类型变量与 int 类型变量相乘,往往可能超出 int 类型可以表示的取值范围。 现在,给出两个 int 类型变量 $x,y$ 及其取值范围,请问 $x\times y$ 的值是否可能超过 int 类型可以表示的范围? > 提示:int 类型可以表示的范围为 $[-2147483648, 2147483647]$,即 $[-2^{31},2^{31}-1]$。也就是,int 类型可以表示的最小值为 $-2147483648$,最大值为 $2147483647$。 ## Input 输入共两行。 输入的第一行为两个整数 $x_l,x_u$,表示变量 $x$ 的取值范围为 $x_l \le x \le x_u$。 输入的第二行为两个整数 $y_l,y_u$,表示变量 $y$ 的取值范围为 $y_l \le y \le y_u$。 ## Output 输出一行一个字符串: - 若会超过,则输出 `long long int`; - 若不会超过,则输出 `int`。 [samples] ## Note ### 数据规模与约定 对于 $100\%$ 的测试数据,$0 \le x_l \le x_u < 2^{31}$,$0 \le y_l \le y_u < 2^{31}$。
Samples
Input #1
1 5
1 5
Output #1
int
Input #2
0 2147483647
0 2147483647
Output #2
long long int
API Response (JSON)
{
  "problem": {
    "name": "[语言月赛 202312] 禁止在 int 乘 int 时不开 long long",
    "description": {
      "content": "在比赛中,根据数据范围,分析清楚变量的取值范围,是非常重要的。int 类型变量与 int 类型变量相乘,往往可能超出 int 类型可以表示的取值范围。 现在,给出两个 int 类型变量 $x,y$ 及其取值范围,请问 $x\\times y$ 的值是否可能超过 int 类型可以表示的范围? > 提示:int 类型可以表示的范围为 $[-2147483648, 2147483647]$,即 $[-",
      "description_type": "Markdown"
    },
    "platform": "Luogu",
    "limit": {
      "time_limit": 100,
      "memory_limit": 524288
    },
    "difficulty": {
      "LuoguStyle": "P1"
    },
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "LGB3906"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "在比赛中,根据数据范围,分析清楚变量的取值范围,是非常重要的。int 类型变量与 int 类型变量相乘,往往可能超出 int 类型可以表示的取值范围。\n\n现在,给出两个 int 类型变量 $x,y$ 及其取值范围,请问 $x\\times y$ 的值是否可能超过 int 类型可以表示的范围?\n\n> 提示:int 类型可以表示的范围为 $[-2147483648, 2147483647]$,即 $[-...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments