G.景点
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.
背景
ZSC001第七题。
题目描述
有个景点,第个景点的门票需要元钱,需要路费元钱。现在,张锦程要去其中的一个景点,他最多会花多少钱?最少会花多少钱?
格式
输入
共行,第一行是,后面行每行有两个数,第行的两个数分别是和。
Output
两行,分别有一个数,第一行是张锦程最多花的钱数,第二行是张锦程最少花的钱数(单位:元)
Samples
5
2 3
4 7
3 5
7 2
8 1
11
5
10
2 3
4 7
3 5
7 2
8 1
9 9
10 12
1 0
5 3
5 5
22
1
ZSC001(Zjc Story Contest001)(张锦程故事竞赛001)
- Status
- Done
- Rule
- Ledo
- Problem
- 8
- Start at
- 2025-1-1 0:00
- End at
- 2025-4-1 0:00
- Duration
- 2160 hour(s)
- Host
- Partic.
- 7