面值1元、4元、16元、64元共计4种硬币,以及面值1024元的纸币。现在小Y使用1024元的纸币购买了一件价值为N(0的商品,请问最少他会收到多少硬币
示例1
输入
200
输出
17
说明
12个64元硬币,3个16元硬币,2个4元硬币
加载中...
import java.util.*; public class Solution { /** * * @param N int整型 * @return int整型 */ public int GetCoinCount (int N) { // write code here } }
class Solution { public: /** * * @param N int整型 * @return int整型 */ int GetCoinCount(int N) { // write code here } };
# # # @param N int整型 # @return int整型 # class Solution: def GetCoinCount(self , N ): # write code here
/** * * @param N int整型 * @return int整型 */ function GetCoinCount( N ) { // write code here } module.exports = { GetCoinCount : GetCoinCount };
# # # @param N int整型 # @return int整型 # class Solution: def GetCoinCount(self , N ): # write code here
package main /** * * @param N int整型 * @return int整型 */ func GetCoinCount( N int ) int { // write code here }
/** * * @param N int整型 * @return int整型 */ int GetCoinCount(int N ) { // write code here }
200
17