题解 | #挑7#
挑7
https://www.nowcoder.com/practice/ba241b85371c409ea01ac0aa1a8d957b
n = int(input()) index = 0 for i in range(1,n+1): if i % 7 == 0: index += 1 continue if "7" in str(i): index += 1 continue print(index)
挑7
https://www.nowcoder.com/practice/ba241b85371c409ea01ac0aa1a8d957b
n = int(input()) index = 0 for i in range(1,n+1): if i % 7 == 0: index += 1 continue if "7" in str(i): index += 1 continue print(index)
相关推荐