View Code of Problem 115

#include <iostream>
using namespace std;
int main(){
	int n;
	while(cin>>n){
		long long m1=1,m2=100000,k=1;
		for(int i=2;i<=n;i++){
			k*=2;
			m1+=k;
			m2+=100000;
		}
		cout<<m1<<" "<<m2<<endl;
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 115