Similar Question Issue

https://codeforces.com/problemset/problem/266/B

was there any similar question like this on codechef recently … i cant remember where i solved this one…has anyone got any idea where it was