Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- //special cases 39 92 49 space
- int main()
- {
- freopen("in.txt", "r", stdin);
- int b[46]={'1','2','3','4','5','6','7','8','9','0','-','=','Q','W','E','R','T','Y','U','I','O','P','[',']','A','S','D','F','G','H','J','K','L',';','Z','X','C','V','B','N','M',',','.','/'};
- char a[100000];
- while(scanf("%[^\n]%*c", a)!=EOF){
- int x;
- for(int i=0;a[i]!='\0';i++){
- x=a[i];
- if(x==39){
- printf(";");
- continue;
- }
- if(x==49){
- printf("`");
- continue;
- }
- if(x==92){
- printf("]");
- continue;
- }
- if(a[i]==' '){
- printf(" ");
- continue;
- }
- for(int j=0;j<46;j++){
- if(a[i]==b[j])
- printf("%c", b[j-1]);
- }
- }
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment