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.