From cd0ec40cf08b75283965e8ecca13cdfe2a560ab3 Mon Sep 17 00:00:00 2001 From: hanyixuanten Date: Mon, 26 Oct 2026 12:03:25 +0000 Subject: [PATCH] new file: B3984.cpp --- B3984.cpp | 7 ++++++ B3984.md | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 B3984.cpp create mode 100644 B3984.md diff --git a/B3984.cpp b/B3984.cpp new file mode 100644 index 0000000..d976893 --- /dev/null +++ b/B3984.cpp @@ -0,0 +1,7 @@ +#include +using namespace std; +long long x, y; +int main() { + scanf("%lld%lld", &x, &y); + printf("%lld\n", (long long) ceil((y - x) / (long double)2.0)); +} \ No newline at end of file diff --git a/B3984.md b/B3984.md new file mode 100644 index 0000000..b7c8222 --- /dev/null +++ b/B3984.md @@ -0,0 +1,69 @@ +# B3984 [语言月赛 202406] 编程学习 + +## 题目描述 + +小 B 喜欢学习编程,他已经做了 $x$ 道题目。在接下来的一段时间,小 B 每天可以做 $1$ 道或 $2$ 道编程题。小 B 至少还需要多少天,才能做到 $y$ 道题? + +## 输入格式 + +输入一行两个整数 $x,y$。 + +## 输出格式 + +输出一行一个整数,表示最小的天数。 + +## 输入输出样例 #1 + +### 输入 #1 + +``` +3 6 + +``` + +### 输出 #1 + +``` +2 + +``` + +## 输入输出样例 #2 + +### 输入 #2 + +``` +4 10 + +``` + +### 输出 #2 + +``` +3 + +``` + +## 输入输出样例 #3 + +### 输入 #3 + +``` +4 135428 + +``` + +### 输出 #3 + +``` +67712 + +``` + +## 说明/提示 + +### 数据规模与约定 + +- 对于 $20\%$ 的测试数据,$1 \leq x < y \leq 10$; +- 对于 $60\%$ 的测试数据,$1 \leq x < y \leq 10^6$; +- 对于 $100\%$ 的测试数据,$1 \leq x < y \leq 10^{18}$。 \ No newline at end of file