Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 59b8e99

Browse files
authored
feat: add python solution to lc problem: No.0319 (#1877)
1 parent cffca8e commit 59b8e99

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

‎solution/0300-0399/0319.Bulb Switcher/README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@
6363
<!-- 这里可写当前语言的特殊实现逻辑 -->
6464

6565
```python
66+
class Solution:
67+
def bulbSwitch(self, n: int) -> int:
68+
return int(n ** (1 / 2))
6669

6770
```
6871

‎solution/0300-0399/0319.Bulb Switcher/README_EN.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ So you should return 1 because there is only one bulb is on.</pre>
5050
### **Python3**
5151

5252
```python
53+
class Solution:
54+
def bulbSwitch(self, n: int) -> int:
55+
return int(n ** (1 / 2))
5356

5457
```
5558

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class Solution:
2+
def bulbSwitch(self, n: int) -> int:
3+
return int(n ** (1 / 2))

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /