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

题目:

题解:

python 复制代码
class Solution:
    def bulbSwitch(self, n: int) -> int:
        return int(sqrt(n + 0.5))
相关推荐
智算菩萨2 分钟前
【论文复现】Applied Intelligence 2025:Auto-PU正例无标签学习的自动化实现与GPT-5.4辅助编程实战
论文阅读·python·gpt·学习·自动化·复现
小陈工1 小时前
2026年3月31日技术资讯洞察:AI智能体安全、异步编程突破与Python运行时演进
开发语言·jvm·数据库·人工智能·python·安全·oracle
老李的勺子1 小时前
Agent 记忆失效的 5 种方式:完整排查复盘
python·llm
Leo655352 小时前
动态透视报表 + 查询接口 + Excel导出
开发语言·windows·python
清水白石0082 小时前
pytest Fixture 设计实战指南:作用域、依赖链、自动清理与测试资源高效复用
python·pytest
tottoramen2 小时前
如何安装龙虾
python
QC·Rex2 小时前
AI Agent 任务规划实战:从 ReAct 到 Plan-and-Solve 的完整指南
人工智能·python·react
副露のmagic3 小时前
数组章节 leetcode 思路&实现
算法·leetcode·职场和发展
kcuwu.3 小时前
Python面向对象:封装、继承、多态
开发语言·python
YuanDaima20483 小时前
LangChain基础配置与对话模型实战
人工智能·python·langchain·大模型·智能体·langgraph