用python 编写函数求1~n之间能被7整除,但不能同时被5整除的所有整数
收起
n=int(input('请输入n:')) for i in range(7,n+1): if i%7==0 and i%5!=0: print(i,end=' ')
报告相同问题?