You are viewing a single comment's thread. Return to all comments →
Java
public static long strangeCounter(long t) {
long cycle = 1; long initialValue = 3; while (t > initialValue) { t -= initialValue; initialValue *= 2; cycle *= 2; } return initialValue - t + 1; }
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
public static long strangeCounter(long t) {