흠 ¶
2006-02-17 Accepted 0.002 Minimum |
코드 ¶
~cpp #include <iostream> #include <cstring> using namespace std; #include <string> int main() { char input[1000]; char result; int length, i, j; char data[] = {"1234567890-=QWERTYUIOP[]\ASDFGHJKL;'ZXCVBNM,./ "}; while(cin.getline(input, 1000)) { length = strlen(input); for(i = 0; i < length; i++) { if(input[i] == ' ') result = ' '; else { for(j = 0; j < strlen(data)+1; j++) { if(input[i] == data[j]) result = data[j-1]; } } cout << result; } cout << endl; } return 0; }