原题题目
代码实现(首刷自解)
class Solution {
public:int findMinFibonacciNumbers(int k) {
vector<int> num;int now = 1,pre = 1,temp,ret = 0;while(now <= k){
num.emplace_back(now);temp = now;now += pre;pre = temp;}int pos = num.size()-1;while(k){
int times = k/num[pos];k = k%num[pos--];ret += times;}return ret;}
};