View Code of Problem 115

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

Double click to view unformatted code.


Back to problem 115