You are viewing a single comment's thread. Return to all comments →
Java 8
public static long strangeCounter(long t) { long time = 0; long x = 0; while(time < t) { x = 2*x + 1; time = 3 * x; } return 1 + (time - t); }
Seems like cookies are disabled on this browser, please enable them to open this website
Strange Counter
You are viewing a single comment's thread. Return to all comments →
Java 8