for c in input()[::-1]: if c.isdigit(): print("双日行驶" if int(c) % 2 == 0 else "单日行驶") break else: continue
s: str = input() while not s[-1].isdigit(): s = s[:-1] print("双日行驶" if int(s[-1]) % 2 == 0 else "单日行驶")
cp=input() x=-1 #从末尾开始 while "A"<=cp[x]<="Z": x-=1 #向字符串前取值 if int(cp[x])%2==0: print("双日限行") else: print("单日限行")
注册一个 TZHSOJ 通用账户,您就可以在我们提供的所有在线评测服务上提交代码、参与讨论。
使用您的 TZHSOJ 通用账户