View Code of Problem 64

public class Main{
		public static void main(String args[]) {
		int k, L, n;
		n = 10;
		k = 2;
		L = 10;
		for (int i = 1; i <= n; i++) {
			if (2 * k - k / 2 > L)
				break;
			else
				k = 2 * k - k / 2;
		}
		System.out.println(k);
	}
}

Double click to view unformatted code.


Back to problem 64