QOJ.ac

QOJ

Límite de tiempo: 2 s Límite de memoria: 1024 MB

#23984. Mex

Estadísticas

תיאור הבעיה

נתונים שני מספרים שלמים $A$ ו-$B$ הגדולים או שווים ל-$0$.

הדפיסו את המספר השלם הקטן ביותר שגדול או שווה ל-$0$ ושאינו $A$ ואינו $B$.

מגבלות

  • $0 \le A \le 100$.
  • $0 \le B \le 100$.
  • כל ערכי הקלט הם מספרים שלמים.

קלט

הקלט ניתן בפורמט הבא:

A B

פלט

הדפיסו את המספר השלם הקטן ביותר שגדול או שווה ל-$0$ ושאינו $A$ ואינו $B$.

אל תדפיסו דבר מלבד התשובה. (למשל, אל תדפיסו טקסט המבקש להזין קלט.)

לגבי פורמט התשובה, ניתן להיעזר בבעיות התרגול ודוגמאות הפתרון שלהן.

דוגמה 1

קלט

0 4

פלט

1

מבין המספרים השלמים הגדולים או שווים ל-$0$ שאינם $0$ ואינם $4$, הקטן ביותר הוא $1$. לכן מדפיסים $1$.

דוגמה 2

קלט

1 0

פלט

2

מבין המספרים השלמים הגדולים או שווים ל-$0$ שאינם $1$ ואינם $0$, הקטן ביותר הוא $2$. לכן מדפיסים $2$.

דוגמה 3

קלט

9 12

פלט

0

מבין המספרים השלמים הגדולים או שווים ל-$0$ שאינם $9$ ואינם $12$, הקטן ביותר הוא $0$. לכן מדפיסים $0$.

דוגמה 4

קלט

0 0

פלט

1

מבין המספרים השלמים הגדולים או שווים ל-$0$ שאינם $0$ ואינם $0$, הקטן ביותר הוא $1$. לכן מדפיסים $1$.

שימו לב כי ייתכן ש-$A$ ו-$B$ שווים.

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.