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

用c又写了一遍,找到为什么wa了

Posted by bottles at 2009-03-16 19:42:11 on Problem 1504
In Reply To:discuss 里这2个人的理解不一样,但是都ac了 Posted by:bottles at 2009-03-16 18:47:01
long long temp = 0;
	while(n){
		temp += n % 10;
		n /= 10;
		temp *=10;
	}
	temp /=10;

这样写reverse函数的时候,一定要将temp 设为longlong ,因为在while里有可能超进度

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