无码av一区二区三区无码,在线观看老湿视频福利,日韩经典三级片,成 人色 网 站 欧美大片在线观看

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

leetcode 824. Goat Latin

2021-05-10 16:54 作者:您是打尖兒還是住店呢  | 我要投稿

A sentence?S?is given, composed of words separated by spaces. Each word consists of lowercase and uppercase letters only.

We would like to convert the sentence to "Goat Latin"?(a made-up language similar to Pig Latin.)

The rules of Goat Latin are as follows:

  • If a word begins with a vowel (a, e, i, o, or u), append?"ma"?to the end of the word.
    For example, the word 'apple' becomes 'applema'.
    ?

  • If a word begins with a consonant (i.e. not a vowel), remove the first letter and append it to the end, then add?"ma".
    For example, the word?"goat"?becomes?"oatgma".
    ?

  • Add one letter?'a'?to the end of each word per its word index in the sentence, starting with 1.
    For example,?the first word gets?"a"?added to the end, the second word gets?"aa"?added to the end and so on.

Return the?final sentence representing the conversion from?S?to Goat?Latin.?



難得開心的一天,在病痛的折磨下;

leetcode 824. Goat Latin的評論 (共 條)

分享到微博請遵守國家法律
通化市| 博野县| 昌乐县| 资源县| 西乌珠穆沁旗| 盖州市| 大竹县| 肃南| 墨玉县| 曲靖市| 田阳县| 缙云县| 梅河口市| 拜城县| 靖州| 中山市| 尼玛县| 泉州市| 嘉兴市| 柏乡县| 安龙县| 卫辉市| 德惠市| 呈贡县| 正定县| 巫溪县| 滁州市| 涟源市| 梨树县| 濮阳市| 安吉县| 济南市| 阿克苏市| 克东县| 越西县| 崇明县| 花莲市| 增城市| 青铜峡市| 玉树县| 梅河口市|