1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| #include <bits/stdc++.h> #define fastio ios_base::sync_with_stdio(false), cin.tie(nullptr) using namespace std;
map<char, char> mp; int main(){ fastio; string s; mp['2'] = '`', mp['3'] = '1', mp['4'] = '2', mp['5'] = '3', mp['6'] = '4', mp['7'] = '5', mp['8'] = '6', mp['9'] = '7', mp['0'] = '8', mp['-'] = '9', mp['='] = '0'; mp['e'] = 'q', mp['r'] = 'w', mp['t'] = 'e', mp['y'] = 'r', mp['u'] = 't', mp['i'] = 'y', mp['o'] = 'u', mp['p'] = 'i', mp['['] = 'o', mp[']'] = 'p', mp['\\'] = '['; mp['d'] = 'a', mp['f'] = 's', mp['g'] = 'd', mp['h'] = 'f', mp['j'] = 'g', mp['k'] = 'h', mp['l'] = 'j', mp[';'] = 'k', mp['\''] = 'l'; mp['c'] = 'z', mp['v'] = 'x', mp['b'] = 'c', mp['n'] = 'v', mp['m'] = 'b', mp[','] = 'n', mp['.'] = 'm', mp['/'] = ','; while(getline(cin, s)){ for(int i = 0; i < s.length(); ++i){ if(s[i] == ' ') cout << " "; else cout << mp[s[i]]; } cout << "\n"; } }
|