Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Solution for 319. #1877

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Oct 25, 2023
3 changes: 3 additions & 0 deletions solution/0300-0399/0319.Bulb Switcher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@
<!-- 这里可写当前语言的特殊实现逻辑 -->

```python
class Solution:
def bulbSwitch(self, n: int) -> int:
return int(n ** (1 / 2))

```

Expand Down
3 changes: 3 additions & 0 deletions solution/0300-0399/0319.Bulb Switcher/README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ So you should return 1 because there is only one bulb is on.</pre>
### **Python3**

```python
class Solution:
def bulbSwitch(self, n: int) -> int:
return int(n ** (1 / 2))

```

Expand Down
3 changes: 3 additions & 0 deletions solution/0300-0399/0319.Bulb Switcher/Solution.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class Solution:
def bulbSwitch(self, n: int) -> int:
return int(n ** (1 / 2))