View Code of Problem 115

import java.util.Scanner;
 
public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while(scanner.hasNext()) {
			int n = scanner.nextInt();
			long fu = n * 100000;
			long mo;
			if(n != 1) {
				mo = (long) ((1 - Math.pow(2, n))/(1-2));
			}else {
				mo = 1;
			}
			System.out.println(mo+" "+fu);
		}
	}
}

Double click to view unformatted code.


Back to problem 115