当前位置:网站首页>剑指Offer(十):矩形覆盖
剑指Offer(十):矩形覆盖
2022-07-26 10:35:00 【康斯坦奇】
解法1:就是一个斐波那契数列!
class Solution:
def rectCover(self, number):
# write code here
if number <= 3:
return number
first,second,third = 1,2,0
for i in range(3,number+1):
third = first+second
first = second
second = third
return third
边栏推荐
- 常见的类(了解)
- 数据分析入门 | kaggle泰坦尼克任务
- Oracle cannot start tnslistener service cannot start
- Uninstall Meizu app store
- QRcode二维码(C语言)遇到的问题
- .net operation redis string string
- .NET操作Redis Set无序集合
- Application of.Net open source framework in industrial production
- Uniapp uses the simple method signalr (only for web debugging, cannot package apps)
- centos8(liunx)部署WTM(ASP.NET 5)使用pgsql
猜你喜欢
反射机制简述
Okaleido ecological core equity Oka, all in fusion mining mode
Navicat15 MySQL (centos7) connected to local virtual machine
数据分析入门 | kaggle泰坦尼克任务
404页面和路由钩子
Some cutting-edge research work sharing of SAP ABAP NetWeaver containerization
hx711 数据波动大的问题
[Halcon vision] morphological expansion
Comparison of packet capturing tools fiddler and Wireshark
STM32 阿里云MQTT esp8266 AT命令
随机推荐
.NET 开源框架在工业生产中的应用
Tradingview tutorial
反射机制简述
Redis特殊数据类型使用场景
QRcode二维码(C语言)遇到的问题
第8期:云原生—— 大学生职场小白该如何学
干货likeshop外卖点餐系统开源啦100%开源无加密
上传图片获取宽高
数据分析入门 | kaggle泰坦尼克任务
el-table实现可编辑表格
头歌 Phoenix 入门(第1关:Phoenix 安装、第2关:Phoenix 基础语法)
[C language] named type and anonymous type
2022pta usual training questions (1-10 string processing questions)
algorithm
L2-005 集合相似度(vector、set求并交集)
.net5wtm (asp.net core) PgSQL unpacking operation
12 复制对象时勿忘其每一个成分
json_ object_ put: Assertion `jso->_ ref_ count > 0‘ failed. Aborted (core dumped)
链式方法调用的事务问题剖析
SuperMap IClient for Leaflet 加载高斯克吕格投影三度分带CGCS2000大地坐标系WMTS服务