View Code of Problem 115

#include<iostream>
using namespace std;

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

Double click to view unformatted code.


Back to problem 115