e620: 輸入法切換
Tags : 中文
Accepted rate : 11人/13人 ( 85% ) [非即時]
評分方式:
Tolerant

最近更新 : 2019-11-18 06:50

Content

c9 284ru8 cl3

5k4wu6g4gj bj4z83fu, jc04

阿!忘記切輸入法了!

沒關係,不慌不慌,我們有輸入法轉換器!

再把那些文字轉回注音就能看懂啦XD

是不是很聰明!(就是懶得重打

可是我們都懶得重打那些文字了,怎麼又有心情打程式呢?

可以請你幫忙嗎?

阿!怕你不是用注音鍵盤,以下為對應表:

注音對應表:

char keyboard[37] = {
        '1','q','a','z','2','w','s','x','e','d','c','r','f','v','5','t','g','b','y','h','n',
        'u','j','m',
        '8','i','k',',','9','o','l','.','0','p',';','/','-'};

string Bopomofo[37] = {
        "ㄅ","ㄆ","ㄇ","ㄈ","ㄉ","ㄊ","ㄋ","ㄌ","ㄍ","ㄎ","ㄏ","ㄐ","ㄑ","ㄒ","ㄓ","ㄔ","ㄕ","ㄖ","ㄗ","ㄘ","ㄙ",
        "ㄧ","ㄨ","ㄩ",
        "ㄚ","ㄛ","ㄜ","ㄝ","ㄞ","ㄟ","ㄠ","ㄡ","ㄢ","ㄣ","ㄤ","ㄥ","ㄦ"};

聲調對應表:

char keyboard[5] = {' ','6','3','4','7'}

string tone[5] = {" ","ˊ","ˇ","ˋ","˙"}

分別代表一聲、二聲、三聲、四聲、輕聲。

 

注意:注音有分為聲母、介音、韻母三部分,聲母為[ㄅ ~ ㄙ],介音為[ㄧ ~ ㄩ],韻母為[ㄚ ~ ㄦ]

打的順序並不會造成拼音錯誤(如範例測資三)

Input

包含多組測資。

每組測資一行,每行有一串忘記轉輸入法的文字。

原始文句不包含標點符號或空格,而且不會有拼音錯誤的字。

Output

對於每組測資

輸出轉換成注音輸入法後的文字。

Sample Input
c9 284ru8 cl3
5k4wu6g4gj bj4z83fu, jc04
pjg4mv4j14/u3;uv3puq pu 
Sample Output
ㄏㄞ ㄉㄚˋㄐㄧㄚ ㄏㄠˇ
ㄓㄜˋㄊㄧˊㄕˋㄕㄨ ㄖㄨˋㄈㄚˇㄑㄧㄝ ㄏㄨㄢˋ
ㄕㄨㄣˋㄒㄩˋㄅㄨˋㄧㄥˇㄒㄧㄤˇㄆㄧㄣ ㄧㄣ 
測資資訊:
記憶體限制: 64 MB
公開 測資點#0 (50%): 1.0s , <1K
公開 測資點#1 (50%): 1.0s , <1K
Hint :
Tags:
中文
出處:
트와이스 [管理者:
ig99lp33lp33 (원스)
]


ID User Problem Subject Hit Post Date
20014 e620
76 2019-11-16 18:41