整型溢出
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
给你两个 位整数 ,请你算算这两个数的和 是否需要使用 long long
类型储存。
输入格式
一行两个整数 。
输出格式
如果用 int
( 位整数)能存得下两个数的和,就输出 int
。如果 int
存不下,用 long long
才能存得下,就输出 long long
。
2000 5000
int
2147483647 1
long long
-2147483647 -1
int
数据规模与约定
对于 的数据,保证 。
- 子任务 1(30 分):保证 。
- 子任务 2(30 分):保证 。
- 子任务 3(40 分):没有特殊限制。
数据类型名 | 内容(一般情况) | 占用内存大小 | 能储存的范围 |
---|---|---|---|
int /signed |
位整数 | Bytes | 即 |
long long |
位整数 | Bytes | 即 |
XAZXOI Round 13 - Level 1
- Status
- Done
- Rule
- Ledo
- Problem
- 4
- Start at
- 2025-4-19 19:00
- End at
- 2025-4-20 12:00
- Duration
- 17 hour(s)
- Host
- Partic.
- 3