a062: QWERTY QWERTY
標籤 : 迴圈
通過比率 : 100% (9 人 / 9 人 ) (非即時)
評分方式 :
Tolerant

最近更新 : 2019-04-09 09:00

內容

From the input of a string of characters (only for those characters whose ASCII codes are between 32 and 125), according to the position of each of these characters on the keyboard, please output the character on the right side of the keyboard. For example, ‘W’ is just right next to ‘Q’ on the keyboard. If the right side is a two-layer button (contains two characters), then output the lower-layer character. For example, we need to output ‘;’ if the input is ‘L’. If the input character is an upper-layer (or lower-layer) character, then output the upper-layer (or lower-layer) character of the right-side button, respectively. If the right-side button denotes a non-printable character such as Shift, Enter, and Backspace, or there is no right-side button, please output the same input character.

 

輸入一段文字 ( 限制為 ASCII 表中,編號 32 至 125 之字元 ) ,將它們每個字元依照鍵盤的位置,印出它們右邊的字元,若右邊按鍵有兩層字元 ( 如 ‘:’和‘;’位於同一按鍵上 ) ,則輸出下層字元,即‘;’,若該按鍵為上層字元 ( 如‘!’) 則輸出其右邊按鍵之上層字元 ( 如‘@’) ,若輸入的字元右邊的鍵為不可視按鍵,如 shift, enter, backspace 或右邊已無按鍵,則不做更動,照樣輸出。

輸入說明

The first line of the input contains an integer n (0 < n < 10) which is the number of test cases. The following lines are test datasets each of which includes a string of characters whose ASCII codes are between 32 and 125.

第一列輸入一個正整數 n (0 < n < 10),代表有 n筆測資。

每筆測資輸入一行鍵盤上屬於 ASCII 表中編號 32 至 125 之字元,並以 enter 結束該行。

輸出說明

Please output the corresponding right-side characters as the rules mentioned before. Please print a cartridge return at the end of each output line.

 

輸出該行每個字元右邊位置的文字,除題目所述之例外字元除外。最後必須有換行字元。

範例輸入
3
Qwer
Adgj
ehn6
範例輸出
wert
sfhk
rjm7
測資資訊 :
記憶體限制 : 64 MB
隱藏 測資點#0 (50%): 1.0s , <1K
隱藏 測資點#1 (50%): 1.0s , <1K
提示 :
標籤:
迴圈
出處:
[編輯 :
shengZJ (shengZJ)
]


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