QOJ.ac

QOJ

حد الوقت: 2 s حد الذاكرة: 1024 MB

#23970. 返乡 2

الإحصائيات

海狸比太郎决定返乡。比太郎返乡如果乘坐电车需要 $X$ 日元,如果乘坐巴士需要 $Y$ 日元。此外,如果不乘坐电车或巴士中的某一种,比太郎就无法返乡。当比太郎持有的现金为 $Z$ 日元时,如果比太郎能用这笔钱返乡则输出 $1$,否则输出 $0$。

约束条件

  • $1 \le X \le 100$。
  • $1 \le Y \le 100$。
  • $1 \le Z \le 100$。
  • 输入的值均为整数。

输入格式

输入按以下格式给出:

X
Y
Z

输出格式

如果比太郎能够返乡则输出 $1$,否则输出 $0$。

除答案外不要输出任何内容。(也不要输出提示输入的文字等。)

样例

样例输入 1

7
2
3

样例输出 1

1

样例解释 1

  • 乘坐电车返乡需要 $7$ 日元,但比太郎只有 $3$ 日元,因此无法乘坐电车返乡。
  • 乘坐巴士返乡需要 $2$ 日元,而比太郎有 $3$ 日元,因此可以乘坐巴士返乡。

比太郎可以返乡。因此输出 $1$。

样例输入 2

10
20
1

样例输出 2

0

样例解释 2

  • 乘坐电车返乡需要 $10$ 日元,但比太郎只有 $1$ 日元,因此无法乘坐电车返乡。
  • 乘坐巴士返乡需要 $20$ 日元,但比太郎只有 $1$ 日元,因此无法乘坐巴士返乡。

比太郎无法返乡。因此输出 $0$。

样例输入 3

3
5
3

样例输出 3

1

样例解释 3

  • 乘坐电车返乡需要 $3$ 日元,而比太郎有 $3$ 日元,因此可以乘坐电车返乡。
  • 乘坐巴士返乡需要 $5$ 日元,但比太郎只有 $3$ 日元,因此无法乘坐巴士返乡。

比太郎可以返乡。因此输出 $1$。

样例输入 4

1
1
10

样例输出 4

1

样例解释 4

  • 乘坐电车返乡需要 $1$ 日元,而比太郎有 $10$ 日元,因此可以乘坐电车返乡。
  • 乘坐巴士返乡需要 $1$ 日元,而比太郎有 $10$ 日元,因此可以乘坐巴士返乡。

比太郎可以返乡。因此输出 $1$。

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.