You are viewing a single comment's thread. Return to all comments →
public static long strangeCounter(long t) { long counter = 3; long seconds = 1; long start = 3; while (t > 1) { long interval = Math.min(counter, t-1); t -= interval; seconds += interval; counter -= interval; if (counter == 0) { start = start * 2; counter = start; } } return counter; }
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 →