摘要: class Solution { public int bulbSwitch(int n) { return (int)Math.sqrt(n); // 刚开始灯都是关的,所以按奇数次会打开。比如n = 12; // 会在 第 1,12 2,6 3 ,4 轮被按,所以会被关闭 // 所以序号的因子个 阅读全文
posted @ 2020-09-18 15:19 Sexyomaru 阅读(101) 评论(0) 推荐(0) 编辑