View Code of Problem 115

#include<bits/stdc++.h>
using namespace std;
int main() {
	int n;
	while (cin >> n) {
		int sum = 0;
		int p=1;
		for (int i = 1; i <= n; i++) {
				sum+=p;
				p=p*2;
		}
	cout <<sum<<" "<<n*100000<<endl;
}
}

Double click to view unformatted code.


Back to problem 115