纸的张数
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.
问题描述
小A很爱学习,每天都要看几页编程书,此书的第1页和第2页在同一张纸上,第3页和第4页在同一张纸上,第5页和第6页在同一张纸上,依次类推。这天小A从书的第x页看到了第y页,请问小A一共看了几张纸。
输入
一行,两个正整数x和y(1≤x,y≤100000),分别表示开始页码和结束页码,数与数之间以空格隔开。
输出
一行,一个整数,表示纸张数量。
Samples
1 4
2
Limitation
1s, 1024KiB for each test case.
628
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 13
- Start at
- 2025-6-28 13:00
- End at
- 2025-6-30 15:00
- Duration
- 50 hour(s)
- Host
- Partic.
- 3