public class Solution { public int Fibonacci(int n) { //错误输入处理 if(n<0) return -1; int pre = 1; int result = 0; for(int i=0; i<n; i++){ //计算第i项 result ...
分类:
其他好文 时间:
2018-11-26 13:49:07
阅读次数:
156
改mss后import example 主要是用fat的函数读写sd 本次的sd就是把文件拷到sd上,命名。然后用open打开,读到数据,用dma写到ddr上。结束后用dma取出,写回到sd卡上。 ...
分类:
其他好文 时间:
2018-11-24 14:04:53
阅读次数:
155
原文地址:https://jeffknupp.com/blog/2016/03/07/python-with-context-managers/ Of all of the most commonly used Python constructs, context managers are neck ...
分类:
编程语言 时间:
2018-11-21 17:51:55
阅读次数:
138
The HO6 insurance Policy is the most common type of policy used to insure town homes and condos in the United States. It is commonly referred to as HO ...
分类:
其他好文 时间:
2018-11-19 14:09:27
阅读次数:
188
1. Quesiton: 872. Leaf-Similar Trees url: https://leetcode.com/problems/leaf-similar-trees/description/ Consider all the leaves of a binary tree. From ...
分类:
其他好文 时间:
2018-11-17 23:20:29
阅读次数:
198
resource fork, Finder information, or similar detritus not allowed
分类:
其他好文 时间:
2018-11-17 22:16:07
阅读次数:
179
package ch06; public class Fibonacci { public static int getNumber(int n) { if(n == 1) { return 0; } else if(n == 2){ return 1; } else { ... ...
分类:
编程语言 时间:
2018-11-17 11:55:16
阅读次数:
168
https://leetcode.com/tag/union-find/ ...
分类:
其他好文 时间:
2018-11-15 17:07:47
阅读次数:
253
题目链接:传送门 题目大意: 求斐波那契数列第n项F(n)。 (F(0) = 0, F(1) = 1, 0 ≤ n ≤ 109) 思路: 用矩阵乘法加速递推。 算法竞赛进阶指南的模板: #include <iostream> #include <cstring> using namespace st ...
分类:
其他好文 时间:
2018-11-14 01:09:53
阅读次数:
224
Description
Fibonacci数列定义为(1,1,2,3,5,8,.....),即每个元素是前两个元素的和。如果一个Fibonacci数与所有小于它的Fibonacci数互质,那么称之为Fibonacci质数。 现在要求你输出前n个Fibonacci数 The Fibonacci Num... ...
分类:
编程语言 时间:
2018-11-10 21:12:55
阅读次数:
280