Codechef problems


Can u plz help me to solve this sum.Please tell the algo used and why its used

check out this