题解 | #WERTYU#
WERTYU
https://www.nowcoder.com/practice/0f318e6fffe3490cb700e16b65a93b1b?tpId=62&tqId=29450&tPage=1&rp=1&ru=/ta/sju-kaoyan
#include<bits/stdc++.h>
using namespace std;
int main() {
string s = "1234567890-=QWERTYUIOP[]\ASDFGHJKL;'ZXCVBNM,./"; string st;
string s1;s1.resize(200);
for (int i = 1; i < s.size(); i++) {
s1[s[i]] = s[i - 1];
}
char a = ' ';
s1[a] = a;
while (getline(cin, st)) {
for (int i = 0; i < st.size(); i++)
if (st[i] == '1')
cout << '1';
else
cout << s1[st[i]];
}
}