您的位置:首页 > 其它

UVA 10082(p47)----WERTYU

2016-02-29 11:12 483 查看
#include<cstdio>
#include<iostream>
#define debu
using namespace std;
char s[] = "`1234567890-=QWERTYUIOP[]\\ASDFGHJKL;'ZXCVBNM,./";
string st;
int main()
{
#ifdef debug
freopen("in.in","r",stdin);
#endif // debug
char c,i;
while(getline(cin,st))
{
int l=st.length();
for(int j=0;j<l;j++)
{
int k;
for(k=0;st[j]!=s[k]&&k<47;k++);
if(st[j]!=' ') printf("%c",s[k-1]);
else printf("%c",' ');
}
printf("\n");
}
return 0;
}

题目地址:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1023

题解:模拟
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: