题解 | #挑7#
挑7
https://www.nowcoder.com/practice/ba241b85371c409ea01ac0aa1a8d957b
num = int(input()) list1=[] for i in range(1,num+1): # (1)能被7整除 if i%7==0: list1.append(i) # 包含7,且当前值不在列表中 if '7' in str(i) and i not in list1: list1.append(i) print(len(list1)) #列表长度就是与7有关数字的个数