#include<iostream> #include<string> using namespace std; int main() { string s1 = "qwertyuiopasdfghjklzxcvbnm"; string s2 = "wertyuiop[sdfhgjkl;xcvbnm,"; int t; string str; cin >> t; getchar(); while (t--) { cin >> str; for (int i = 0; i < str.size(); i++) { for (int j = 0; j < 26; j++) { if (str[i] == s2[j]) { cout << s1[j]; break; } } } cout << endl; } return 0; } |
Double click to view unformatted code.