SOSUSOSU

假装这是一个正经的页面

[spojCOINS]Bytelandian gold coins爆搜longlong

https://www.spoj.com/problems/COINS/
题面
In Byteland they have a very strange monetary system.

Each Bytelandian gold coin has an integer number written on it. A coin n can be exchanged in a bank into three coins: n/2, n/3 and n/4. But these numbers are all rounded down (the banks have to make a profit).

You can also sell Bytelandian coins for American dollars. The exchange rate is 1:1. But you can not buy Bytelandian coins.

You have one gold coin. What is the maximum amount of American dollars you can get for it?
翻译(百度)
在拜特兰,他们有一个非常奇怪的货币体系。
每一枚拜特兰金币上都写着一个整数。一枚硬币n可以在银行兑换成三枚硬币:n/2、n/3和n/4。但这些数字都是四舍五入的(银行必须盈利)。
你也可以用美元卖拜特兰的硬币。汇率是1:1。但是你不能买拜特兰的硬币。
你有一枚金币。你最多能拿到多少美元?

直接搜,记忆化,记得开longlong

点赞

发表评论

电子邮件地址不会被公开。 必填项已用*标注