×

# a very easy problem

 0 http://www.codechef.com/problems/EASYPROB/ plz explain the question asked 10 Mar '15, 15:28 2●2●4●13 accept rate: 0%

 4 @code_baba: The problem asks you to output some form of these numbers: 137, 1315, 73, 136, 255, 1384, 16385, one per line in the listed order. Let’s see the first line of the correct output: 137=2(2(2)+2+2(0))+2(2+2(0))+2(0) Hmmm… I don’t want to take the fun out the problem by giving the answer directly to you. So, I will give you a clue. The clue: If you have been thinking in this direction : “How can I make the left hand side (in this case 137) to become the right hand side?” Stop thinking! The right direction to think for this problem is: “How can I make the RIGHT HAND SIDE of the equation to become the left hand side?” Got it? Just notice the number being used again and again and you will be able to find the pattern.(Did you know :2^2=4) answered 10 Mar '15, 15:57 906●5●12 accept rate: 0%
 0 Hi In this problem you have to represent the given number in form of sum if 2^n where n>=0 for example 5=4+1=(2^2)+(2^0) For 1-10 0=0 1=2(0) 2=2 3=2+2(0) 4=2(2) 5=2(2)+2(0) 6=2(2)+2 7=2(2)+2+2(0) 8=2(2+2(0)) 9=2(2+2(0))+2(0) 10=2(2+2(0))+2 answered 17 Dec '16, 00:49 12 accept rate: 0%
 0 12=2(2+2(0))+2(2) answered 17 Dec '16, 01:55 1 accept rate: 0%
 0 What!!!! wait guys, don't confuse me please answered 17 Dec '16, 06:01 32 accept rate: 8%
 0 Hint: 137 = 128 + 8 + 1 1315 = 1024 + 256 + 32 + 2 + 1 73 = 64 + 8 + 1 136 = 128 + 8 255 = 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 1384 = 1024 + 256 + 64 + 32 + 8 16385 = 16384 + 1 Every number can be written as sum of powers of 2 with each power used only once or never answered 05 Sep '17, 18:39 3●1 accept rate: 0%
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×3,673
×632

question asked: 10 Mar '15, 15:28

question was seen: 5,191 times

last updated: 05 Sep '17, 18:39