mirror of
				https://gitee.com/coder-xiaomo/leetcode-problemset
				synced 2025-11-04 03:33:12 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			28 lines
		
	
	
		
			916 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			916 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
<p>今天的有氧运动训练内容是在一个长条形的平台上跳跃。平台有 <code>num</code> 个小格子,每次可以选择跳 <strong>一个格子</strong> 或者 <strong>两个格子</strong>。请返回在训练过程中,学员们共有多少种不同的跳跃方式。</p>
 | 
						||
 | 
						||
<p>结果可能过大,因此结果需要取模 1e9+7(1000000007),如计算初始结果为:1000000008,请返回 1。</p>
 | 
						||
 | 
						||
<p><strong>示例 1:</strong></p>
 | 
						||
 | 
						||
<pre>
 | 
						||
<strong>输入:</strong>n = 2
 | 
						||
<strong>输出:</strong>2
 | 
						||
</pre>
 | 
						||
 | 
						||
<p><strong>示例 2:</strong></p>
 | 
						||
 | 
						||
<pre>
 | 
						||
<strong>输入:</strong>n = 5
 | 
						||
<strong>输出:</strong>8
 | 
						||
</pre>
 | 
						||
 | 
						||
<p> </p>
 | 
						||
 | 
						||
<p><strong>提示:</strong></p>
 | 
						||
 | 
						||
<ul>
 | 
						||
	<li><code>0 <= n <= 100</code></li>
 | 
						||
</ul>
 | 
						||
 | 
						||
<p>注意:本题与主站 70 题相同:<a href="https://leetcode-cn.com/problems/climbing-stairs/">https://leetcode-cn.com/problems/climbing-stairs/</a></p>
 |