View Code of Problem 115

#include<stdio.h>
#include<math.h>
int main(){
	int n;
	while(scanf("%d",&n)!=EOF){
		double sum=0;
		int f = n*100000;
		while(n>0){
			sum=sum+pow(2,n-1);
			n--;
		}
		printf("%.lf %d\n",sum,f);
	}
	
	
	
}

Double click to view unformatted code.


Back to problem 115