QOJ.ac

QOJ

Time Limit: 2 s Memory Limit: 256 MB Total points: 100

#22762. התמדה כפלית

Statistics

הפרות משחקות במשחק עם מספרים. הן מתחילות ממספר כלשהו, למשל 6593. הן מחלצות את הספרות (למשל 6, 5, 9, 3) ומכפילות אותן זו בזו כדי לקבל מכפלה (במקרה הזה, $6 x 5 x 9 x 3 = 810$). הן חוזרות על כך (למשל $8 x 1 x 0$) ומקבלות 0, מספר בן ספרה אחת.

עזרו לפרות לשחק. קראו מספר והציגו את הצעדים עד לקבלת מספר בן ספרה אחת.

קלט

מספר שלם התחלתי $N$ ($10 \le N \le 2{,}000{,}000{,}000$).

פלט

שורה אחת עם מספרים שלמים: המספר ההתחלתי והמספרים המתקבלים בזה אחר זה מהחישוב, עד לקבלת מספר בן ספרה אחת.

דוגמאות

קלט 1

98886

פלט 1

98886 27648 2688 768 336 54 20 0

מחבר הבעיה: Russ Cox

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.