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()) {
            Integer get = Integer.valueOf(scanner.nextLine());
            int n1 = 0;
            int n2 = 0;
            for (int i = 0; i < get; i++) {
                n1 += 100000;
                n2 += Math.pow(2, i);
            }
            System.out.println(n2 + " " + n1);
        }
    }
}

Double click to view unformatted code.


Back to problem 115