源程序:
m = 1000n = 1000while True: if m % 7 == 3 and m % 5 == 2 and m % 3 == 1: print(m) break if n % 7 == 3 and n % 5 == 2 and n % 3 == 1: print(n) break n = n + 1 m = m - 1