View Code of Problem 115

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

Double click to view unformatted code.


Back to problem 115