滴滴研发笔记题,亮灯问题

 

废话不说,直接上代码。

_author_ = "yang"
count = 0
for i in range(1,2016):
    count1 = 0
    for bulb in range(1, 2016):
        if i % bulb == 0:
            count1 += 1
    if count1 % 2 == 0:
        count +=1
count = 2015 -count
print(count)
View Code

 

posted @ 2016-12-14 10:35  杨小愚  阅读(224)  评论(0编辑  收藏  举报