[语言月赛 202508] 航班延误

Luogu
IDLGB4381
Time1000ms
Memory512MB
DifficultyP1
2025分支结构语言月赛
扶苏购买的航班延误险规则如下: - 如果航班按时起飞或延误时间小于 $1$ 小时,不予赔付; - 如果起飞延误时间不低于 $1$ 小时且低于 $2$ 小时,赔付 $a$ 元; - 如果起飞延误时间不低于 $2$ 小时且低于 $4$ 小时,赔付 $b$ 元; - 如果起飞延误时间不低于 $4$ 小时,赔付全额机票款,为 $t$ 元。 已知扶苏的飞机起飞延误时间为 $x$ 分钟($x = 0$ 表示按时起飞),请你求出她能被延误险赔付多少元。 ## Input 输入只有一行四个整数,依次表示 $x, a, b, t$。 ## Output 输出一行一个整数,表示扶苏功能通过延误险获得的赔付金额。 [samples] ## Background 夏季出行,航班延误总是不得不品鉴的一环。所以,饱受航班延误折磨的扶苏给她的下一段行程购买了延误险!当航班延误超过一定时间,就可以获得现金赔付。 ## Note 对全部的测试数据,保证 $0 \leq x, a,b,t \leq 10^5$。
Samples
Input #1
30 1 2 3
Output #1
0
Input #2
80 1 2 3
Output #2
1
Input #3
150 1 2 3
Output #3
2
Input #4
250 1 2 3
Output #4
3
API Response (JSON)
{
  "problem": {
    "name": "[语言月赛 202508] 航班延误",
    "description": {
      "content": " 扶苏购买的航班延误险规则如下: - 如果航班按时起飞或延误时间小于 $1$ 小时,不予赔付; - 如果起飞延误时间不低于 $1$ 小时且低于 $2$ 小时,赔付 $a$ 元; - 如果起飞延误时间不低于 $2$ 小时且低于 $4$ 小时,赔付 $b$ 元; - 如果起飞延误时间不低于 $4$ 小时,赔付全额机票款,为 $t$ 元。 已知扶苏的飞机起飞延误时间为 $x$ 分钟($x = 0$ ",
      "description_type": "Markdown"
    },
    "platform": "Luogu",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 524288
    },
    "difficulty": {
      "LuoguStyle": "P1"
    },
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "LGB4381"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "扶苏购买的航班延误险规则如下:\n\n- 如果航班按时起飞或延误时间小于 $1$ 小时,不予赔付;\n- 如果起飞延误时间不低于 $1$ 小时且低于 $2$ 小时,赔付 $a$ 元;\n- 如果起飞延误时间不低于 $2$ 小时且低于 $4$ 小时,赔付 $b$ 元;\n- 如果起飞延误时间不低于 $4$ 小时,赔付全额机票款,为 $t$ 元。\n\n已知扶苏的飞机起飞延误时间为 $x$ 分钟($x = 0$ 表...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments