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