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

30题萌新AC留念

Posted by XianYugong at 2017-03-30 19:21:20 on Problem 1517
#include<stdio.h>
int main()
{
	double sum=0;
	printf("n e\n- -----------\n");
	int i = 0;
	for(;i<10;i++)
	{
		int temp=  1;
		for(int j = 1;j<=i;j++)
		{
			temp = temp*j;
		} 
		sum+=1.0/temp;
		
		if(i ==0) printf("0 1\n");
		else if(i ==1) printf("1 2\n");
		else if(i ==2) printf("2 2.5\n");
		else 
			printf("%d %.9lf\n",i,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