View Code of Problem 115

#include "stdio.h"
#include "string.h"

void main()
{	
	int i;
	int sum1,sum2;
	int n,k;
	for(;scanf("%d",&n)!=EOF;)
	{
		sum1=0;
		sum2=0;
		k=1;
		for(i=0;i<n;i++)
		{
			sum1=sum1+100000;

		}
		for(i=0;i<n;i++)
		{

			sum2=sum2+k;
			k=2*k;
		}
		printf("%d %d\n",sum2,sum1);
	}
}

Double click to view unformatted code.


Back to problem 115