演员的自我修养


  • 首页

  • 关于我

  • 标签

  • 归档

  • 搜索

Leetcode 824 Goat Latin

发表于 2018-05-11 |

图1

图2

分析:
这道题是真的弱智

1
2
3
4
5
6
7
8
def toGoatLatin(S):
res = S.split()
for i,s in enumerate(res):
if s[0] in 'aeiouAEIOU':
res[i] = s + 'ma' + 'a'*(i+1)
else:
res[i] = s[1:]+s[0] + 'ma' + 'a'*(i+1)
return ' '.join(res)
# Leetcode problems # string
Leetcode_825_Friends_Of_Appropriate_Ages
Leetcode 823 Binary Trees With Factors
王琛

王琛

我要证明谁才是世界第一的actor

188 日志
27 标签
RSS
© 2020 王琛
本站访客数:
本站总访问量次