View Code of Problem 115

#include<stdio.h>
#include<math.h>
int main()
{
	int n;
  	while(scanf("%d",&n)!=EOF)
        {
        	long int sum1=0,sum2=0;
  		sum2=100000*n;
  		for(int i=0;i<n;i++)
        	{
        		sum1=sum1+pow(2,i);
        	}
  		printf("%ld %ld\n",sum1,sum2);
        }
  	return 0;
}

Double click to view unformatted code.


Back to problem 115