Python | Leetcode Python题解之第319题灯泡开关

题目:

题解:

python 复制代码
class Solution:
    def bulbSwitch(self, n: int) -> int:
        return int(sqrt(n + 0.5))
相关推荐
用户83562907805110 分钟前
用Python轻松管理Word页脚:批量处理与多节文档技巧
后端·python
进击的松鼠21 分钟前
LangChain 实战 | 快速搭建 Python 开发环境
python·langchain·llm
一起努力啊~22 分钟前
算法刷题--长度最小的子数组
开发语言·数据结构·算法·leetcode
小北方城市网27 分钟前
第1课:架构设计核心认知|从0建立架构思维(架构系列入门课)
大数据·网络·数据结构·python·架构·数据库架构
leoufung34 分钟前
LeetCode 221:Maximal Square 动态规划详解
算法·leetcode·动态规划
源代码•宸38 分钟前
Leetcode—39. 组合总和【中等】
经验分享·算法·leetcode·golang·sort·slices
好易学·数据结构39 分钟前
可视化图解算法77:零钱兑换(兑换零钱)
数据结构·算法·leetcode·动态规划·力扣·牛客网
我的offer在哪里44 分钟前
Hugging Face:让大模型触手可及的魔法工厂
人工智能·python·语言模型·开源·ai编程
AlenTech1 小时前
226. 翻转二叉树 - 力扣(LeetCode)
算法·leetcode·职场和发展
Tisfy1 小时前
LeetCode 1458.两个子序列的最大点积:动态规划
算法·leetcode·动态规划·题解·dp