View Code of Problem 115

#include <stdio.h>

int main()
{
    int n;
    while(scanf("%d",&n)!=EOF)
    {
        int s=0,m=1;
        for(int i=1;i<=n;i++)
        {
            s=s+m;
            m=m*2;
        }
        printf("%d %d\n",s,100000*n);
    }
    return 0;
}

Double click to view unformatted code.


Back to problem 115