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