QOJ.ac

QOJ

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

#23957. แบล็กแจ็ก

الإحصائيات

โจทย์ปัญหา

กำหนดจำนวนเต็ม $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.