View Code of Problem 115

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main (){
	int n;
	while(~scanf("%d", &n)){
		int n1 = 0, n2 = 0, t = 1;
		for(int i = 1;i <= n;i++){
			n1 += t;
			t *= 2;
			n2 += 100000;
		}
		printf("%d %d\n", n1, n2);
	}

	return 0;
}

Double click to view unformatted code.


Back to problem 115