public class Solution { public int BulbSwitch(int n) { var x = Math.Sqrt(n); var y = Convert.ToInt32(Math.Floor(x)); return y; } }
https://leetcode.com/problems/bulb-switcher/#/description