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:核心代码两行搞定!125ms

Posted by zswforever at 2011-09-16 22:14:30 on Problem 1401
In Reply To:核心代码两行搞定!125ms Posted by:20092462 at 2011-02-03 10:04:19
> #include<stdio.h>
> 
> int main()
> {
> 	int n,sum,i,t;
> 
> 	scanf("%d",&t);
> 	while(t--)
> 	{
> 		scanf("%d",&n);
> 		for(sum=0,i=5;i<=n;i*=5)
> 			sum+=n/i;
> 		printf("%d\n",sum);
> 	}
> 
> 	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