View Code of Problem 115

#include<stdio.h>
#include<math.h>
int main()
{
int n,i,j,m=1;
int a=1;
while(scanf("%d",&n)!=EOF)
{m=1;a=1;
  for(i=1;i<n;i++)
{
m=2*m;
a=a+m;
}
printf("%d %d\n",a,100000*n);
}
return 0;
}

Double click to view unformatted code.


Back to problem 115