View Code of Problem 115

#include<stdio.h>
#include<math.h>
int main(){
	long long n,a=0,b=0,temp; 
	while(scanf("%lld",&n)!=EOF){
		for(double i=0;i<n;i++){
			a=a+1;
			b=b+pow(2,i);
		}
		printf("%.lld %.lld\n",b,a*100000);
		a=0;
		b=0;
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 115