QOJ.ac

QOJ

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

#23957. Blackjack

الإحصائيات

Problem

You are given $3$ integers $A, B, C$.

Output $1$ if the sum of the $3$ values is at most $21$, and $0$ otherwise.

Constraints

  • $1 \le A \le 13$.
  • $1 \le B \le 13$.
  • $1 \le C \le 13$.
  • All input values are integers.

Input

The input is given in the following format:

A
B
C

Output

Output $1$ if the sum of the $3$ values is at most $21$, and $0$ otherwise.

Do not output anything other than the answer. (Do not output sentences prompting for input, etc.)

Sample Input and Output

Sample Input 1

5
10
6

Sample Output 1

1
  • The sum of the $3$ values is $5 + 10 + 6 = 21$, which is at most $21$. Thus, output $1$.

Sample Input 2

7
8
13

Sample Output 2

0
  • The sum of the $3$ values is $7 + 8 + 13 = 28$, which is not at most $21$. Thus, output $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.