View Code of Problem 115

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

Double click to view unformatted code.


Back to problem 115