随笔分类 -  数学---函数规律

摘要:题目链接:https://leetcode-cn.com/problems/island-perimeter/ 给定一个包含 0 和 1 的二维网格地图,其中 1 表示陆地 0 表示水域。 网格中的格子水平和垂直方向相连(对角线方向不相连)。整个网格被水完全包围,但其中恰好有一个岛屿(或者说,一个或 阅读全文
posted @ 2020-03-16 08:59 wydxry 阅读(251) 评论(0) 推荐(1) 编辑
摘要:题目链接:https://leetcode-cn.com/problems/add-digits/ 给定一个非负整数 num,反复将各个位上的数字相加,直到结果为一位数。 示例: 进阶:你可以不使用循环或者递归,且在 O(1) 时间复杂度内解决这个问题吗? 常规思路: 优化后的:找规律%9 阅读全文
posted @ 2019-04-10 21:58 wydxry 阅读(243) 评论(0) 推荐(0) 编辑
摘要:Manao is trying to open a rather challenging lock. The lock has n buttons on it and to open it, you should press the buttons in a certain order to ope 阅读全文
posted @ 2017-08-17 14:39 wydxry 阅读(496) 评论(0) 推荐(0) 编辑
摘要:You are a lover of bacteria. You want to raise some bacteria in a box. Initially, the box is empty. Each morning, you can put any number of bacteria i 阅读全文
posted @ 2017-08-17 14:26 wydxry 阅读(438) 评论(0) 推荐(0) 编辑
摘要:输入N求N的阶乘的10进制表示的长度。例如6! = 720,长度为3。 Input Output Input示例 Output示例 阅读全文
posted @ 2017-08-17 10:10 wydxry 阅读(270) 评论(0) 推荐(0) 编辑
摘要:输入N求N的阶乘的10进制表示的长度。例如6! = 720,长度为3。 Input Output Input示例 Output示例 阅读全文
posted @ 2017-08-17 10:02 wydxry 阅读(301) 评论(0) 推荐(0) 编辑

Live2D