#Lutece2079. ありがとうございます
ありがとうございます
Migrated from Lutece 2079 ありがとうございます
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
在数字王国,一个数可以选择以下四种魔法之一变成另一个数:
. 变为 消耗点魔法值
. 变为 消耗点魔法值
. 变为 消耗点魔法值
. 如果是的倍数,变为 消耗点魔法值.
现给你,请问你要把通过魔法变成,最少需要消耗多少魔法值?
Input
一行两个整数.
Output
把变成最少需要消耗的魔法值。
Samples
3 2
3