python 4个WA,能帮忙看看吗?
查看原帖
python 4个WA,能帮忙看看吗?
365086
2279975297qian楼主2020/8/15 19:35

a = int(input()) if a < 0 or a > 1000: print('错误') exit() if a % 2 == 0 and 4 < a < 12: b = 1 else: b = 0 if a % 2 == 0 or 4 < a < 12: c = 1 else: c = 0 if a % 2 == 0 and a <= 4 or a >= 12: d = 1 elif a% 2 != 0 and a > 4 or a < 12: d = 1 else: d = 0 if a % 2 != 0 and 12 <= a or 4 >= a: e = 1 else: e = 0 print(f'{b} {c} {d} {e}') #大佬请留步,谢谢

2020/8/15 19:35
加载中...