Editorial for Bedao Regular Contest 05 - MILO


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

Author: bedao

Nhận xét

  • Mọi số ~n~ đều có thể biến đổi để đạt đến các giá trị từ ~1~ đến ~9~

Cách làm

  • Khởi tạo biến ~res = 9~
  • Với mỗi ~n \ge 10~, ta tăng ~n~ lên một đơn vị và cập nhật ~res~. Nếu ~n~ chia hết cho ~10~ thì ta chia ~n~ cho ~10~.

Comments

Please read the guidelines before commenting.


There are no comments at the moment.