View Code of Problem 115

#include<stdio.h>
#include<stdlib.h>

int main(){
	long long unsigned num[31]={1};
	int k = 2;
	for(int i=1;i<31;i++){
		num[i] = num[i-1] + k;
		k = k*2;
	
	}
		
	int n;
	while((scanf("%d",&n)!=EOF)){
		long long sum = n * 100000;
		printf("%lld %lld\n",num[n-1],sum);
	
	}

	return 0;
}

Double click to view unformatted code.


Back to problem 115