1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-12-18 18:14:59 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-05-02 23:44:12 +08:00
parent 7ea03594b3
commit 2a71c78585
4790 changed files with 11696 additions and 10944 deletions

View File

@@ -12,7 +12,7 @@
"translatedContent": "<p>现有一个房间,墙上挂有&nbsp;<code>n</code>&nbsp;只已经打开的灯泡和 4 个按钮。在进行了&nbsp;<code>m</code>&nbsp;次未知操作后,你需要返回这&nbsp;<code>n</code>&nbsp;只灯泡可能有多少种不同的状态。</p>\n\n<p>假设这 <code>n</code> 只灯泡被编号为 [1, 2, 3 ..., n],这 4 个按钮的功能如下:</p>\n\n<ol>\n\t<li>将所有灯泡的状态反转(即开变为关,关变为开)</li>\n\t<li>将编号为偶数的灯泡的状态反转</li>\n\t<li>将编号为奇数的灯泡的状态反转</li>\n\t<li>将编号为 <code>3k+1</code> 的灯泡的状态反转k = 0, 1, 2, ...)</li>\n</ol>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><strong>输入:</strong> n = 1, m = 1.\n<strong>输出:</strong> 2\n<strong>说明:</strong> 状态为: [开], [关]\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><strong>输入:</strong> n = 2, m = 1.\n<strong>输出:</strong> 3\n<strong>说明:</strong> 状态为: [开, 关], [关, 开], [关, 关]\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre><strong>输入:</strong> n = 3, m = 1.\n<strong>输出:</strong> 4\n<strong>说明:</strong> 状态为: [关, 开, 关], [开, 关, 开], [关, 关, 关], [关, 开, 开].\n</pre>\n\n<p><strong>注意:</strong>&nbsp;<code>n</code>&nbsp;和&nbsp;<code>m</code> 都属于 [0, 1000].</p>\n",
"isPaidOnly": false,
"difficulty": "Medium",
"likes": 89,
"likes": 91,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Bulb Switcher\", \"titleSlug\": \"bulb-switcher\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u706f\\u6ce1\\u5f00\\u5173\"}]",
@@ -155,7 +155,7 @@
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"4.5K\", \"totalSubmission\": \"8.2K\", \"totalAcceptedRaw\": 4482, \"totalSubmissionRaw\": 8242, \"acRate\": \"54.4%\"}",
"stats": "{\"totalAccepted\": \"4.6K\", \"totalSubmission\": \"8.4K\", \"totalAcceptedRaw\": 4570, \"totalSubmissionRaw\": 8414, \"acRate\": \"54.3%\"}",
"hints": [],
"solution": null,
"status": null,