Loving your explanations dude.
well done C.A as your institute suggests
Loving your explanations dude.
well done C.A as your institute suggests
@taran_1407
I am getting run-time error. I tried too much to find where i am getting this but failed.
please help me.
this is my codeā>
https://www.codechef.com/viewsolution/15994545
thank you
Can anyone give me a test case where my code fails? Itās working well for all the test cases I checked.
PLEASE HELP ME!!!
Iām storing the digits in an array from oneās place. Then I am iterating through all the digits and finding the new number by removing that particular digit. Now, Iām checking whether it is divisible by 6 or not and if it is then I check whether it is largest number possible which I initially set to -1. At last Iām printing the new number with k-1 digits where k is the total number of digits in the initial number. Leading zeros will be printed since I used %0*d and passed k-1 and maxnum to it. LINK:-My Solution
Taran, sorry for posting that link which didnāt work. I updated it. Can you help me?
In problem maximum number in my code I am not able to figure out mistake.
It gives wrong answer on submission.
Can anyone help me debugging it.
Link to my code is
Please help
i dont know why my code is getting wrong anser.
please help me;
link is CodeChef: Practical coding for everyone
i dont know why my code is getting wrong answer, please help; link CodeChef: Practical coding for everyone
simply just check when sum of the digit >= 10 take mod of the ans and store it in an array during calculation in O(n) time then print the same
Mate, Your solution is O(n^2) because Substring function itself take O(N) time because it has to transverse whole string. Further, using Integer.parseInt this many times, you can simply store a number in array, ith element of array being ith digit of number (from left to right or right to left, as you feel comfortable with. ).
Mate, i replied on your thread too. Iām still working with your solution only.
sorry bro didnāt see then. thanks
Try Following test case.
1
55 54
Correct answer 9
Your answer 09
No problem mate.
By the way, why are you using variable p in your code??
Thanks mate.
Which language you are talking about mate??
I work with java. Either share code link.
Nope, It isnāt mentioned in problem but a calculator always print 9, not 09. You may try.