View Code of Problem 115

#include <iostream>
#include <string>
#include <cstdio>
using namespace std;

typedef long long ll;
int main(){
	int n;
	while(cin>>n){
		ll me=0;
		ll rich=0;
		ll st=1;
		for(int i=0;i<n;i++){
			rich+=100000;
			me+=st;
			st*=2;
		}
		cout<<me<<" "<<rich<<endl;
	} 
	return 0;
}

Double click to view unformatted code.


Back to problem 115