package leetcode;

/**
 * https://leetcode.com/problems/bulb-switcher/
 */
public class Problem319 {
    public int bulbSwitch(int n) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem319 prob = new Problem319();
        System.out.println(prob.bulbSwitch(3)); // 1
    }
}

package leetcode;

/**
 * https://leetcode.com/problems/bulb-switcher/
 */
public class Problem319 {
    public int bulbSwitch(int n) {
        return (int) Math.sqrt((double) n);
    }
}

Solve problem 319