文章目录 题目考场代码结果 题目 这题比较水,加上用的是python,考场上几分钟就写完了。 考场代码 n=int(input()) flag=0 count1=[0,0,0,0] count=0 num=1 while(count!=n): if '7'in str(num) or num%7==0: count1[flag]+=1 else: count+=1 flag=(flag+1)%4 num+=1 for i in count1: print(i) 结果