×

# WA in KCHAR

 0 I got partially correct answer in KCHAR. Link to the Question : KCHAR Link to my solution : link Please point out my mistake and try to debug my code. Also, as I am getting correct answer in small input size, have I made any mistakes in data types? Please clarify my doubts. Thank you :) EDIT : Got AC. Thanks to @abhikalpu_123 and @raj79 for help. Appreciate it! Thanks! asked 05 Jul '17, 14:13 614●1●9 accept rate: 12%

 1 The max value of K can be up to 10^18 But your code is handling up to 2^59 i.e. 5*10^17. In your above code make increase the length of array $a$ to 61 instead of 60. (and corresponding changes like making every for loop i<61). As @raj97 said its quite tough but im in a vaccation :D answered 05 Jul '17, 14:48 147●5 accept rate: 8% Or simply, find and replace 61 by 60. :P (05 Jul '17, 14:51) Thanks for analysis of the code :) Urghh when will I stop making small mistakes! Thanks for the help man... Appreciate it :) (05 Jul '17, 14:57)
 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:

×1,070
×135

question asked: 05 Jul '17, 14:13

question was seen: 522 times

last updated: 15 Dec '17, 14:45