#include <iostream> #include <cstring> #include <algorithm> using namespace std; char a[100] = "qwertyuiopasdfghjklzxcvbnm"; char b[100] = "wertyuiop[sdfghjkl;xcvbnm,"; int main(){ int n; cin>>n; getchar(); while(n--){ char s[101]; scanf("%s",s); for(int i=0;i<strlen(s);i++){ for(int j=0;j<26;j++){ if(b[j]==s[i]) { cout<<a[j]; break; } } } cout<<endl; } } |
Double click to view unformatted code.