惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
N
News and Events Feed by Topic
S
Schneier on Security
G
GRAHAM CLULEY
Scott Helme
Scott Helme
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
C
CERT Recently Published Vulnerability Notes
T
The Exploit Database - CXSecurity.com
C
Cisco Blogs
T
The Blog of Author Tim Ferriss
Cisco Talos Blog
Cisco Talos Blog
P
Privacy & Cybersecurity Law Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 司徒正美
Blog — PlanetScale
Blog — PlanetScale
Project Zero
Project Zero
MyScale Blog
MyScale Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
The Last Watchdog
The Last Watchdog
Vercel News
Vercel News
The Cloudflare Blog
C
Check Point Blog
Help Net Security
Help Net Security
Microsoft Security Blog
Microsoft Security Blog
AI
AI
Simon Willison's Weblog
Simon Willison's Weblog
云风的 BLOG
云风的 BLOG
M
MIT News - Artificial intelligence
Stack Overflow Blog
Stack Overflow Blog
腾讯CDC
NISL@THU
NISL@THU
S
Security @ Cisco Blogs
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
S
SegmentFault 最新的问题
MongoDB | Blog
MongoDB | Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
AWS News Blog
AWS News Blog
Cloudbric
Cloudbric
N
News and Events Feed by Topic
PCI Perspectives
PCI Perspectives
S
Securelist
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
Vulnerabilities – Threatpost
S
Secure Thoughts

博客园 - 我的bug

项目引入同一jar包不同版本处理 【笔记】redis实现类 【笔记】websockt一对一聊天java部分 【笔记】vue中websocket心跳机制 【笔记】MySQL删除重复记录保留一条 oss上传实例 jquery实现图片点击旋转 IDEA卡顿解决方法 【笔记】接口发送数据及接收 【笔记】获取新浪财经最新的USDT-CNY的汇率 【笔记】Java 信任所有SSL证书(解决PKIX path building failed问题) 【笔记】jquery判断两个日期之间相差多少天 【笔记】spring定时器时间配置实例 【笔记】jquery加减乘除及科学计算法处理 string 日期相加和相减 sql查询慢原因及优化 java小算法复习 找出一组数字中出现最多的字符 【转载】js清空cookie
斐波那契数列
我的bug · 2018-11-19 · via 博客园 - 我的bug

斐波那契数列

public class test {

	public static void main(String[] args) {

		long[] arr = get(10);
		for (int i = 0; i < arr.length; i++) {
			System.out.print(arr[i]+" ");
		}
	}
	
	public static long[] get(int n){
		long[] arr = new long[n];
		arr[0] = 1;
		arr[1] = 1;
		for (int i = 2; i < n; i++) {
			arr[i] = arr[i-2] + arr[i-1];
		}
		return arr; 
	}

}

  

posted @ 2018-11-19 15:54  我的bug  阅读(198)  评论(0)    收藏  举报