View Code of Problem 115

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

Double click to view unformatted code.


Back to problem 115