View Code of Problem 115

#include<stdio.h>
int main()
{
	long long int n;
	while(scanf("%lld",&n)!=EOF){
		long long int sum1=1,sum2,count=1;
		sum2=100000*n;
		n--;
		while(n--){
			count*=2;
			sum1+=count;
		}
		printf("%lld %lld\n",sum1,sum2);
		
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 115