输入一行:待处理的字符串(长度小于100)。
可能有多组测试数据,对于每组数据, 输出一行:转换后的字符串。
if so, you already have a google account. you can sign in on the right.
If So, You Already Have A Google Account. You Can Sign In On The Right.
while True: try: string = list(input()) lastBlank = True for i in range(len(string)): if string[i].isalpha() and lastBlank: string[i] = string[i].upper() lastBlank = False elif string[i] == " " or string[i] == "\t" or string[i] == "\r" or string[i] == '\n': lastBlank = True else: lastBlank = False print("".join(string)) except Exception: break
# print(" ".join(map(lambda c:c.capitalize(),input().split())))
while True:
try:
string=list(input())
canUpper=True
for i,v in enumerate(string):
if v.isalpha() and canUpper:
string[i]=v.upper()
canUpper=False
elif v==" " or v=="\t" or v=="\n" or v=="\r":
canUpper=True
else:
canUpper=False
print("".join(string))
except:
break