View Code of Problem 115

import java.util.Scanner;

public class Main{
	public static void main(String args[]){
		int n,i,a=100000;
		long b=1;
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			n=sc.nextInt();
			for(i=1;i<n;i++){
				a+=100000;
				b+=b*2;
			}
			System.out.println(b+" "+a);
			a=100000;
			b=1;
		}
	}
}

Double click to view unformatted code.


Back to problem 115