View Code of Problem 115

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

int main() {
	int n,i;
	
	while(scanf("%d",&n)!=EOF){
		double give=0,accept=0;
		for(i=1;i<=n;i++){
			give=give+pow(2,i-1);
			accept=100000*i;
		}
		printf("%.0lf %.0lf\n",give,accept);
	}
}

Double click to view unformatted code.


Back to problem 115