您的程式被監控系統中斷,可能是程式無法正常結束所導致。 Traceback (most recent call last): File "/8212985/code_8212985.py", line 5, in print("\u958f\u5e74") UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)
測試時都沒問題
try:while True:q=int(input())if q%400==0 or (q%4==0 and q%100!=0):print("閏年")else:print("平年")except EOFError:pass錯誤內容:(RE)您的程式被監控系統中斷,可能是程式無法正常結束所導致。 Traceback (most recent call last): File "/8212985/code_8212985.py", line 5, in print("\u958f\u5e74") UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)
測試時都沒問題
跟這個相同的問題:https://zerojudge.tw/ShowThread?postid=27208&reply=27203#27208
try:while True:q=int(input())if q%400==0 or (q%4==0 and q%100!=0):print("閏年")else:print("平年")except EOFError:pass錯誤內容:(RE)您的程式被監控系統中斷,可能是程式無法正常結束所導致。 Traceback (most recent call last): File "/8212985/code_8212985.py", line 5, in print("\u958f\u5e74") UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128)
測試時都沒問題
學弟看一下Error的地方,好像是「閏」這個中文在py裡面對不到ascii code