a036: Secret Letter 秘密信
標籤 : Array 陣列
通過比率 : 88% (7 人 / 8 人 ) (非即時)
評分方式 :
Tolerant

最近更新 : 2019-02-12 16:20

內容

Linya want's to write a secret letter to his friend. Linya encodes the letter by reverse each word, and transforms lowercase to uppercase and uppercase to lowercase. For example, "Dear my friend, how do you do!" is encoded to "RAEd YM DNEIRF, WOH OD UOY OD!".

Now, you are asked to help Linya to encode his letter. A word is a sequence of alphabets A-Z a-z , digits 0-9 , underscore _ , or apostrophe ' .

Linya想要給他的朋友寫一封秘密信。 Linya通過反轉每個單詞的字母進行編碼,並將小寫字母轉換為大寫字母,將大寫字母轉換為小寫字母。 例如,“Dear my friend, how do you do!” 編碼為“RAEd YM DNEIRF,WOH OD UOY OD!”。

現在,你被要求幫助Linya編碼他的信件。 單詞是字母A-Z a-z,數字0-9,下劃線_或撇號'的序列。

輸入說明

The input is the letter Linya write.
String length<100.

輸入是Linya寫的信。
字串長度<100。

輸出說明

Output the encoded letter.

輸出編碼後的信。

範例輸入
Dear my friend, We all know who is really a girl's best friend.
Yours sincerely, Linya.
範例輸出
RAEd YM DNEIRF, Ew LLA WONK OHW SI YLLAER A S'LRIG TSEB DNEIRF.
SRUOy YLERECNIS, AYNIl.
測資資訊 :
記憶體限制 : 64 MB
隱藏 測資點#0 (50%): 1.0s , <1K
隱藏 測資點#1 (50%): 1.0s , <1K
提示 :
標籤:
Array 陣列
出處:
線上協同學習平臺 - ITSA 教育部資通訊軟體創新人才推升計畫 [編輯 :
zero_jason (zero_jason(MANAGER))
]


編號 身分 題目 主題 人氣 發表日期
沒有發現任何「解題報告」