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:你没有考虑到1

Posted by superrx at 2006-07-12 22:02:35 on Problem 1423
In Reply To:死人咧,在自己机器上调试答案正确的呀,为什么一提交就是:Wrong Answer呢/L Posted by:12344312 at 2005-10-05 18:24:00
#include <math.h>
#include <stdio.h>
#include <iostream.h>
void main()
{
	
	long i,n,s[100],sum;
	cin>>n;
	for(i=0;i<n;i++)
	cin>>s[i];
	for(i=0;i<n;i++)
	{
		if(s[i]==1)
		{
			cout<<1<<endl;
		}
		else
		{
			sum=(long)((log10(sqrt(4.0*acos(0.0)*s[i]))+s[i]*(log10(s[i])-log10(exp(1.0))))+1);
			cout<<sum<<endl;
		}
	}
}

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