要求读入2个不超过100的非0正整数A和B,然后输出(0,A]中所有能被B整除的数。
A, B = map(int, input(">>>").split()) #输入的A,B用一个空格隔开 for i in range(1, A + 1): if B % i == 0: print(i)