QOJ.ac

QOJ

Time Limit: 2 s Memory Limit: 1024 MB

#23957. 二十一点

Statistics

题目描述

给定 $3$ 个整数 $A, B, C$。

如果这 $3$ 个值的总和不超过 $21$ 则输出 $1$,否则输出 $0$。

数据范围

  • $1 \le A \le 13$。
  • $1 \le B \le 13$。
  • $1 \le C \le 13$。
  • 输入的所有值均为整数。

输入格式

输入以如下格式给出:

A
B
C

输出格式

如果这 $3$ 个值的总和不超过 $21$ 则输出 $1$,否则输出 $0$。

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

输入输出样例

输入样例 1

5
10
6

输出样例 1

1
  • 这 $3$ 个值的总和为 $5 + 10 + 6 = 21$,不超过 $21$。因此输出 $1$。

输入样例 2

7
8
13

输出样例 2

0
  • 这 $3$ 个值的总和为 $7 + 8 + 13 = 28$,不是不超过 $21$。因此输出 $0$。

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.