8000 src/bin/bulb-switcher.rs · bestgopher/leetcode@dbf0d64 · GitHub
[go: up one dir, main page]

Skip to content

Commit dbf0d64

Browse files
committed
src/bin/bulb-switcher.rs
1 parent e7e34ab commit dbf0d64

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/bin/bulb-switcher.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
fn main() {}
2+
3+
struct Solution;
4+
5+
impl Solution {
6+
pub fn bulb_switch(n: i32) -> i32 {
7+
(n as f64).sqrt() as i32
8+
}
9+
}

0 commit comments

Comments
 (0)
0