最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(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的評論 (共 條)

分享到微博請遵守國家法律
临沧市| 南安市| 拉孜县| 社会| 徐汇区| 辰溪县| 皮山县| 会理县| 北京市| 旬阳县| 合肥市| 江川县| 黄大仙区| 瑞金市| 炉霍县| 朔州市| 孝昌县| 理塘县| 阳朔县| 武威市| 滁州市| 曲松县| 麻城市| 洪泽县| 静乐县| 山西省| 濮阳市| 当涂县| 米泉市| 乃东县| 桑植县| 嘉禾县| 佳木斯市| 平泉县| 白山市| 大安市| 南涧| 达州市| 依安县| 清水县| 吉隆县|