QOJ.ac

QOJ

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

#23948. עפרונות 2

الإحصائيات

תיאור הבעיה

ל-JOI יש $A$ ין. מצאו את המספר המרבי של עפרונות שהוא יכול לקנות כאשר עיפרון $1$ עולה $5$ ין.

מגבלות

  • $1 \le A \le 100$.
  • $A$ הוא מספר שלם.

קלט

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

פלט

הדפיסו את המספר המרבי של עפרונות ש-JOI יכול לקנות, ללא ציון היחידה.

אל תדפיסו שום דבר מלבד התשובה. (אל תדפיסו הודעות המבקשות קלט וכדומה.)

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


קלט לדוגמה 1

9

פלט לדוגמה 1

1
  • מכיוון שעיפרון $1$ עולה $5$ ין, JOI יכול לקנות עיפרון $1$.
  • מכיוון ש-$2$ עפרונות עולים $10$ ין, JOI אינו יכול לקנות $2$ עפרונות או יותר.

לכן, יש להדפיס $1$.


קלט לדוגמה 2

10

פלט לדוגמה 2

2
  • מכיוון ש-$2$ עפרונות עולים $10$ ין, JOI יכול לקנות $2$ עפרונות.
  • מכיוון ש-$3$ עפרונות עולים $15$ ין, JOI אינו יכול לקנות $3$ עפרונות או יותר.

לכן, יש להדפיס $2$.


קלט לדוגמה 3

3

פלט לדוגמה 3

0
  • JOI אינו יכול לקנות אפילו עיפרון $1$.

לכן, יש להדפיס $0$.


קלט לדוגמה 4

100

פלט לדוגמה 4

20
  • מכיוון ש-$20$ עפרונות עולים $100$ ין, JOI יכול לקנות $20$ עפרונות.
  • מכיוון ש-$21$ עפרונות עולים $105$ ין, JOI אינו יכול לקנות $21$ עפרונות או יותר.

לכן, יש להדפיס $20$.

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.