QOJ.ac

QOJ

Time Limit: 2 s Memory Limit: 1024 MB

#23970. 返鄉下 2

Statistics

海狸比太郎決定返鄉下。比太郎返鄉下如果搭電車需要 $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.