View Code of Problem 115

#include<iostream>

using namespace std;

int main()
{
    int n;
    while(cin>>n)
    {

    int sum1=0,sum2=0,t=1;
    while(n--)
    {
        sum1+=t;
        sum2+=100000;
        t*=2;
    }
    cout<<sum1<<" "<<sum2<<endl;
    }
}

Double click to view unformatted code.


Back to problem 115