用的python,AC了但感觉不太优雅,希望看看优秀的解法
查看原帖
用的python,AC了但感觉不太优雅,希望看看优秀的解法
658543
Winds_Land楼主2024/1/22 21:08
n = int(input())
def is_even(num):
    return num%2==0
def is_2(num):
    return num >= 4 and num < 13
print("{:.0f} {:.0f} {:.0f} {:.0f}".format(is_even(n) and is_2(n),is_even(n) or is_2(n),(is_even(n) and not is_2(n)) or (not is_even(n) and is_2(n)),not is_even(n) and not is_2(n)))
2024/1/22 21:08
加载中...