题解 | #挑7#
挑7
http://www.nowcoder.com/practice/ba241b85371c409ea01ac0aa1a8d957b
n = int(input())
count = 0
for i in range(n):
num = i + 1
divisible = num % 7
include_seven = False
for j in range(len(str(num))):
if str(num)[j] == '7':
include_seven = True
if divisible == 0 or include_seven:
count += 1
print(count)