View Code of Problem 115

#include<bits/stdc++.h>
using namespace std;


int main() {
	int n;
	while (cin >> n) {
		long long  a = 1;
		long long sum = 1;
		for (int i = 1; i < n; i++) {
			 a *= 2;;
			 sum += a;
		}
		cout << sum << " " << n * 100000 << endl;
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 115