QOJ.ac

QOJ

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

#23919. การเปรียบเทียบสามทาง

الإحصائيات

กำหนดจำนวนเต็ม $2$ จำนวน คือ $A, B$

จงเปรียบเทียบค่าของ $A$ และ $B$ หาก $A < B$ ให้แสดงผล $-1$ หาก $A = B$ ให้แสดงผล $0$ และหาก $A > B$ ให้แสดงผล $1$

ข้อจำกัด

  • $1 \le A \le 1000$
  • $1 \le B \le 1000$
  • $A, B$ เป็นจำนวนเต็ม

ข้อมูลนำเข้า

ข้อมูลนำเข้าจะถูกกำหนดให้จากอินพุตมาตรฐานในรูปแบบต่อไปนี้:

A
B

ข้อมูลส่งออก

หาก $A < B$ ให้แสดงผล $-1$ หาก $A = B$ ให้แสดงผล $0$ และหาก $A > B$ ให้แสดงผล $1$

ตัวอย่าง

ข้อมูลนำเข้า 1

3
7

ข้อมูลส่งออก 1

-1

หมายเหตุ

  • เนื่องจาก $3 < 7$ จึงแสดงผล $-1$

ข้อมูลนำเข้า 2

10
10

ข้อมูลส่งออก 2

0

หมายเหตุ

  • เนื่องจาก $10 = 10$ จึงแสดงผล $0$

ข้อมูลนำเข้า 3

1000
1

ข้อมูลส่งออก 3

1

หมายเหตุ

  • เนื่องจาก $1000 > 1$ จึงแสดงผล $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.