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:没有理由啊!这样也能过哈!

Posted by huxinjie at 2009-10-12 21:00:36 on Problem 1604
In Reply To:没有理由啊!这样也能过哈! Posted by:zhangliqiang at 2007-09-13 13:21:33
> #include<iostream.h>
> #include<iomanip.h>
> int main()
> {
> 	int n,i;
> 	while(cin>>n)
> 	{
> 		int m=1;
> 		for(i=1;i<=n;i++)
> 		{
> 			m=m*i;
> 			if(m%10==0)
> 				while(m%10==0)
> 					m=m/10;
> 			m=m%100000;
> 		}
> 		cout<<setw(5)<<n<<" -> "<<m%10<<endl;
> 	}
> 	return 0;
> }


orz

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