View Code of Problem 115

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

Double click to view unformatted code.


Back to problem 115