题解 | #挑7#

挑7

http://www.nowcoder.com/practice/ba241b85371c409ea01ac0aa1a8d957b

def my_func(data):
    for i in data:
        res = 0
        for k in range(1, int(i)+1):
            if (k % 7 == 0)&nbs***bsp;("7" in str(k)):
                res += 1
        print(res)

data = []
while True:
    try:
        data.append(input())
    except (KeyboardInterrupt, EOFError):
        break

my_func(data)
全部评论

相关推荐

牛客84809583...:举报了
点赞 评论 收藏
分享
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务