View Code of Problem 115

#include <stdio.h>

int main(){
	int n,sum,temp;
	//输入:1个整数n,n<=30 
	while(scanf("%d", &n)!=EOF){
		sum=0; temp=1;
		//处理 
		for(int i=1; i<=n; i++){
			sum+=temp;
			temp*=2;
		}
		//输出:2个整数 
	printf("%lld %lld\n", sum, n*100000);
	}
	
}

Double click to view unformatted code.


Back to problem 115