?
# | Author | Problem | Lang | Verdict | Time | Memory | Sent | Judged | |
---|---|---|---|---|---|---|---|---|---|
53261516 |
Practice: rofaelrefaey87 |
474A - 27 | C++17 (GCC 7-32) | Accepted | 31 ms | 4 KB | 2019-04-24 22:47:33 | 2019-04-24 22:47:35 |
#include <bits/stdc++.h> using namespace std; string a="qwertyuiopasdfghjkl;zxcvbnm,./"; int main(){ char b; char c[100]; scanf("%c",&b); scanf("%s",&c); if(b=='R'){ for(int i=0;c[i]!='\0';i++){ for(int j=0;j<30;j++){ if(c[i]==a[j]) printf("%c",a[j-1]); }}} else if(b=='L'){ for(int i=0;c[i]!='\0';i++){ for(int j=0;j<30;j++){ if(c[i]==a[j]) printf("%c",a[j+1]); }}}}
?
?
?
?