#21542: 測試3 7:00 為什麼是At School


joshualee (Josh)

學校 : 不指定學校
編號 : 123346
來源 : [49.216.33.132]
最後登入時間 :
2020-11-21 09:51:45

x = input()

hh = int(x[:2])

mm = int(x[3:])

if (hh == 7 and mm >=30) or (8<= hh <= 16):

    print("At School")

else:

    print("Off School") 


這樣測試3是錯的

x = input()

hh = int(x[:2])

mm = int(x[3:])

if (hh == 7 and mm >=30) or (8<= hh <= 16) or (hh ==7 and mm =00):

    print("At School")

else:

    print("Off School")

 

這樣測試3是對的

#21543: Re:測試3 7:00 為什麼是At School


joshualee (Josh)

學校 : 不指定學校
編號 : 123346
來源 : [49.216.33.132]
最後登入時間 :
2020-11-21 09:51:45

x = input()

hh = int(x[:2])

mm = int(x[3:])

if (hh == 7 and mm >=30) or (8<= hh <= 16):

    print("At School")

else:

    print("Off School") 


這樣測試3是錯的

x = input()

hh = int(x[:2])

mm = int(x[3:])

if (hh == 7 and mm >=30) or (8<= hh <= 16) or (hh ==7 and mm == 00):

    print("At School")

else:

    print("Off School")

 

這樣測試3是對的