You are viewing a single comment's thread. Return to all comments →
JAVA solution using simple math.
long time=1,value=3; while(time<t) { time=time+value; value=value*2; } if(time==t) return value; else { long prev_t=time-(value/2); return (value/2)-(t-prev_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 solution using simple math.