Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

SMHTE - Editorial

$
0
0

PROBLEM LINK:

http://www.codechef.com/SMHT2014/problems/SMHTE

DIFFICULTY:

CAKEWALK

PREREQUISITES:

None.

EXPLANATION

This problem can be solved by Brute Force. Dividing the number by 2 in a loop and checking for remainder would suffice. But the trick is with smaller source code.A common BIT-TRICK of using this expression ((n)&(n-1)) would be handy, if one wants to shorten the source code.


Viewing all articles
Browse latest Browse all 40121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>