×

Can someone please provide me with Editorial of Problem BASE (December Long Challenge 2016)

 0 Contest Problem: here Practice Problem: here Also the link for the Editorail doesn't works (https://discuss.codechef.com/problems/BASE) asked 21 Feb '17, 17:47 4★rdrsadhu 134●8 accept rate: 11%

 1 First of all, for N=1 answer is INFINITY and for N=0 answer is 0. For all other values of N :- We can find all the bases for what representation of N starts with 1 and there are d digits in the representation. For this bd<=N and 2×bd>N. This can be written as b<=N(1/d) and b>(N/2)(1/d). Simply using pow function gives precision errors here so we have to use binary search instead. Now you can do two binary searches on b for numbers from 1 to 10(12/d) for the above two conditions for all possible d. Here d can be at most 40 as 240 > 1012 answered 21 Feb '17, 18:18 5★equlnox 180●6 accept rate: 0%
 0 I saw a solution and the following code was written what does that means m=pow(n,(1/(double)j)+1e-15); k=pow(n/2,(1/(double)j)+1e-15); answered 15 Mar '17, 14:38 2★manas321 1 accept rate: 0%
 0 @manas321 this statement m and k gives the range...and when u go deeply in this question,u will derive an formula that u have to find the range between m and k.Here m is equal to the power of n^(1/j) nd k denotes power of (n/2)^(1/j)..nd abve statement of finding the power finds an accurate value as m=pow(n,(1/(double)j)+1e-15)..otherwise there seems to be an error in finding ranges..u can see my solution https://www.codechef.com/viewsolution/12391435 to understand clearly. answered 15 Mar '17, 15:25 21●2 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:

×15,679
×2,718
×82

question asked: 21 Feb '17, 17:47

question was seen: 1,347 times

last updated: 18 Jul '18, 10:46