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

题目:

题解:

python 复制代码
class Solution:
    def bulbSwitch(self, n: int) -> int:
        return int(sqrt(n + 0.5))
相关推荐
向科→向总工→空间动态计系统19 分钟前
机器人大脑系统
开发语言·人工智能·python·机器人
染指111020 分钟前
194.DeepAgents-在DeepAgents中使用自定义沙盒环境OpenSandBox
网络·人工智能·python·langchain·deepagents
吞下星星的少年·-·1 小时前
LeetCode 热题 100 最长连续序列(哈希表)
算法·leetcode·散列表
m0_646429971 小时前
LangGraph 学习笔记(一):StateGraph 与状态管理
python·langgraph
Dmz丶1 小时前
前端转 AI 100 天 Day 57:RAG 项目实战(六)——上线后迭代,从“能用”到“越用越好”
python
Pniubi2 小时前
力扣25.K个一组反转链表
算法·leetcode·链表
小小-猿2 小时前
用 Python 写昇腾算子:pyasc 是怎么回事
开发语言·python·昇腾·cann·pyasc
蓝蓝的代码人3 小时前
用 Python、Qt 和 Vue 做一个 Windows 股票看盘工具,观潮的行情小窗与桌面提醒
vue.js·python·qt·开源·桌面应用
富贵儿9983 小时前
NL2SQL 实践手记 10:从命令行到网页查询——把整个系列串起来
数据库·python·sql·ai·自然语言处理·langchain
fengkai45453 小时前
Python对接LangChain智能体开发(Tool工具调用与 Agent智能体)
运维·开发语言·python·langchain·llm·ai agent·tool