Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

水题一个。贴个代码(最传统的打表)

Posted by 0810311106 at 2009-08-21 16:23:13 on Problem 2538
#include"stdio.h"
#include"string.h"
int main()
{
	char s[100];
	char a[100]; 
        s[';'] = 'L';
	s['L'] = 'K';
	s['K'] = 'J';
	s['J'] = 'H';
	s['H'] = 'G';
	s['G'] = 'F';
	s['F'] = 'D';
	s['D'] = 'S';
	s['S'] = 'A';
	s[','] = 'M';
	s['M'] = 'N';
	s['N'] = 'B';
	s['B'] = 'V';
	s['V'] = 'C';
	s['C'] = 'X';
	s['X'] = 'Z';
        s['['] = 'P';
	s['P'] = 'O';
	s['O'] = 'I';
	s['I'] = 'U';
	s['U'] = 'Y';
	s['Y'] = 'T';
	s['T'] = 'R';
	s['R'] = 'E';
	s['E'] = 'W';
        s['W'] = 'Q';
	s['/'] = '.';
	s['\''] = ';';
        s[']'] = '[';
	s['\\'] = ']';
	s['.'] = ',';
        s['='] = '-';
	s['-'] = '0';
	s['0'] = '9';
	s['9'] = '8';
	s['8'] = '7';
	s['7'] = '6';
	s['6'] = '5';
	s['5'] = '4';
	s['4'] = '3';
        s['3'] = '2';
	s['2'] = '1';
	s['1'] = '`';
	s[' ']=' ';
	while(gets(a))
	{
		int i;
		for(i=0;i<strlen(a);i++)
		printf("%c",s[a[i]]);
		printf("\n");
	}
	return 0;
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator