View Code of Problem 115

#include<bits/stdc++.h>
using namespace std;
#define max 100000
int main(){
	int day,op = 1;
	long long momoney = 0,fumoney = 0; 
	while(cin>>day){
		for(int i = 0;i<day;i++){
			fumoney = fumoney +  max;
			momoney = momoney + pow(2,i);
		}
		cout<<momoney<<" "<<fumoney<<endl;
		momoney = 0;
		fumoney = 0;
		
	}
	
	
	
	
	
	
	
	return 0;
	
}


Double click to view unformatted code.


Back to problem 115