'''
输入任意年份判断是否闰年
·能被4整除但不能被100整除的年是闰年(整四不整百)
·400的整数倍年是闰年(整四百)
'''
year = eval(input("请输入任意年份:"))
if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
    print("%d年是闰年!" % (year))
else:
    print("%d年不是闰年!" % (year))


# 一个简单的条件循环语句实现汉诺塔问题

def my_print(args):
    print(args)


def move(n, a, b, c):
    my_print((a, '-->', c)) if n == 1 else (move(n-1, a, c, b) or move(1, a, b, c) or move(n-1, b, a, c))

move(3, 'a', 'b', 'c')

results matching ""

    No results matching ""