【題解】UVA 10082 WERTYU

目錄

 

題目描述

題意分析

AC代碼


題目描述

https://vj.e949.cn/17da58ae1cdd5a22021b976e9544b652?v=1542269294

題意分析

題意:鍵盤輸入誤導致 右移一位,將其還原

AC代碼

/**
* Copyright(c)
* All rights reserved.
* Author : Mingzhe
* Date : 2018-10-16-20.03.12
* Description : sample
*/
#include <cstdio>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <cstdlib>
#include <map>
#include <list>
#include <stack>
#include <queue>
#include <string>
#include <cstring>
#include <memory.h>
#define MAXN 10005
#define INF 0x3f3f3f3f
using namespace std;
typedef long long ll;

char s[]="`1234567890-=QWERTYUIOP[]\\ASDFGHJKL;'ZXCVBNM,./";

int main()
{
    char c;
    while( (c=getchar())!=EOF)
    {
        if(c==' ') cout<<' ';
        else if( c=='\n') cout<<endl;
        else
        {
            for(int i=0;i<strlen(s);i++)
            {
                if(c==s[i])
                {
                    cout<<s[i-1];
                    break;
                }
            }
        }
    }
    return 0;
}

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章