UVa 10082 WERTYU
Code:
#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
char arr[100]={"`1234567890-=QWERTYUIOP[]\ASDFGHJKL;'ZXCVBNM,./"};
string str;
while(getline(cin,str))
{
int len=str.size();
for(int i=0;i<len;i++)
{
if(str[i]==' ') cout<<' ';
else
{
for(int j=0;j<50;j++)
{
if(str[i]==arr[j]) cout<<arr[j-1];
}
}
}
cout<<endl;
}
return 0;
}
留言
張貼留言