#P1025. 输入一个数并按要求输出
题目描述 写一个程序,实现以下步骤: 1、输入一个数; 2、如果这个数为0,结束程序; 3、如果这个数是3的倍数,跳转到步骤1; 4、如果这个数不是3的倍数,输出这个数,跳转到步骤1。
输入格式 输入一个整数
输出格式 按题目要求输出
代码示例:
while 1:
a = int(input())
if a == 0:
break
if a%3 == 0:
continue
print (a)