View Code of Problem 115

#include<stdio.h>


int main()
{
	double n;
	int i;
	double sem=0,fw,sum_fw;
	while(scanf("%lf",&n)!=EOF)
	{
		if(n==0)
			sum_fw=0;
		else
			sum_fw=1;
		sem=100000*n;
		fw=1;
		for(i=2;i<=n;i++)
		{
			fw=fw*2;
			sum_fw+=fw;
		}
		printf("%.0lf %.0lf\n",sum_fw,sem);		
	}
	
	return 0;
}

Double click to view unformatted code.


Back to problem 115