摘要: //C语言 int fib(int N){ if(N==0) return 0; if(N==1) return 1; int f0=0,f1=1,res,i; for(i=2; i<=N; i++){ res=f0+f1; f0=f1; f1=res; } return res; } /*C++* 阅读全文
posted @ 2020-10-18 19:45 温暖了寂寞 阅读(95) 评论(0) 推荐(0) 编辑
摘要: //C++ class Solution { public: vector<int> finalPrices(vector<int>& prices) { vector<int> arr; int i,j; for(i=0; i<prices.size()-1; i++) { for(j=i+1; 阅读全文
posted @ 2020-10-18 00:17 温暖了寂寞 阅读(187) 评论(0) 推荐(0) 编辑