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

Re:让switch或者elseif快些的办法

Posted by MaElsTroM at 2007-06-12 17:53:37 on Problem 1002
In Reply To:让switch或者elseif快些的办法 Posted by:cooper at 2007-06-12 13:11:37
	//俺是用JAVA的~嘿嘿~
	private static char formalize(char chr) {
		if (chr >= '0' && chr <= '9')
			return chr;
		else if (chr >= 'A' && chr <= 'Y')
			return (char) ((chr < 'Q' ? chr - 'A' : chr - 'B') / 3 + '2');
		else
			return ' ';
	}

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