https://algo-logic.info/how-to-think-cp/

6𝑖 and 9𝑖 can be solved successfully if we consider 6𝑖 and 9𝑖 separately; when there are only 6𝑖 or 9𝑖 coins, we can greedily determine the minimum number of coins to use. Let’s split the price into two parts and consider each as a case of paying with 6𝑖 coins or 9𝑖 coins.


This page is auto-translated from /nishio/ABC099C using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I’m very happy to spread my thought to non-Japanese readers.