【文件属性】:
文件名称:leetcode走楼梯-LeetcodeProblems:Leetcode问题
文件大小:3KB
文件格式:ZIP
更新时间:2021-07-01 06:02:52
系统开源
leetcode
走踏板Leetcode问题
这些是
leetcode.com
问题的已接受提交
70.
爬楼梯:
你在爬楼梯。
需要n步才能到达顶部。
每次您可以爬
1
或
2
个台阶。
你可以通过多少种不同的方式登上顶峰?
示例
1:
输入:n
=
2
输出:2
解释:有两种方法可以爬到顶部。
1
步
+
1
步
2
个步骤
示例
2:
输入:n
=
3
输出:3
解释:有三种方法可以爬到顶部。
1步+1步+1步
1
步
+
2
步
2步+1步
约束:
1
<=
n
<=
45
1486.
数组中的异或运算:
给定一个整数
n
和一个整数开始。
定义一个数组
nums,其中
nums[i]
=
start
+
2*i(0
索引)和
n
==
nums.length。
返回
nums
的所有元素的按位异或。
示例
1:
输入:n
=
5,
start
=
0
输出:8
解释:数组
nums
等于
[0,
2,
4,
6,
8]
其中
(0
^
2
^
4
^
6
^
8)
=
8。其中“^”对应按位异或运算符。
示例
2:
输入:n
=
4,
start
=
3
输出:8
解释:数组
【文件预览】:
LeetcodeProblems-main
----XOR Operation (LeetCode Problem).cs(172B)
----MaxBallons(LeetCode Problem).cs(1KB)
----Reverse Integer(LeetcodeProblem).cs(257B)
----README.md(2KB)
----Minimum Number of Stairs (Leetcode problem).cs(792B)