Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
OP solved it, closing
OP solved it, closing
Same error
@steffan153 Nothing is visible. There is a
red arrow
to left of "KataTest". It's expand/collapse feature. But expanding it doesn't show anything.@mahesh2492 Were you able to proceed so far ?
@mahesh2492 You can add a print statement for any random failing test by
if
condition to print all input parameters as well as your return value.print your return value to find out which test is failing and then add checks accordingly.
Answered.
just "RTFM"? x)
For input, (70000, 70245) : 70001 70009 70061 70079 70121 70141 70163 70241
I got primes => 70001,70009,70061,70079,70121,70141,70163,70207,70241
It failed because 70207 is not in solution list but it a backward prime as well as lie in range. Test cases are not correct. Can anyone explain me why 70207 is not a backward prime.
This comment is hidden because it contains spoiler information about the solution
Very concise solution. Just 1 doubt I looked for isLetter/isDigit but there is no such method.
Thanks. I understood later after reading all comments on discussion. They have poorly explained the problem.
733049910872815764
in chunks of 5 digits becomes73304 99108 72815
(the last chunk is discarded).Because they're not, they are all rotated left by one position.
73304 99108 72815 -> 33047 91089 28157
I didn't understand this test case:
revrot("733049910872815764", 5) --> "330479108928157"
After spliting, we will get (73304,9910872815764). First number is odd, so we shift it and get 33047.Second number is odd again. So we will get 9108728157649. After merging both, we don't get expected answer.
Can any one please explain me? Any help will be appreciated.
Scroll to the bottom. It will tell you what went wrong.
All test cases have been passed but it gave Exit Code: 1 when I attempted. Not sure what it means?
Anyone please guide me. Thanks
Loading more items...