 # [Community Puzzle] Solid Integer

The validator name suggests it’s a small number so you could make a simple brute force version and loop through possible input values on that and your version until you find a difference?

2 Likes

thanks that did the trick !

I got everything else correct except test case 5: “output may overflow”.

My algorithm got ------------> 3364658598948395418.
But the expected answer is 33646585979948395414.

I don’t know which part is wrong. Any mathematic expert here?

Thanks for the help!

You got one less digit in your answer. You should check your algorithm/logic why there is a digit missing.

Can anyone help me with the problem? I haven’t understood it yet

I’ve got same problem as you have but with PHP as language.

My algorithm got : 33646585979948395094
Expected answer should have been : 33646585979948395414

I really don’t understand where is the problem except a silent overflow or automatic conversion or approximation of a division.

My algorithm got : 33646585979948395094

Your algorithm created a zero which is not allowed in the proper answer.

Any ideas on what the Submission ‘Another Medium Validator’ could be? I fixed an issue when the nTh result was 999999’s, but can’t seem to find where it would fall over.

Both the input and the output of that validator are numbers smaller than 10000. You may try testing all the numbers smaller than 10000 one by one to see where your code fails 111 is a solid integer, but 121 is the 100th solid number.

1 Like

### Failure

Not sure what I might be doing wrong, but my algorithm got this answer of test #05. Its working for all other cases

Found:
33645975979948395414

Expected:
33646585979948395414

I’dont realise need help It’s basically counting with 9 digits rather than 10, so base-9 counting. However, normally when you do base-9 counting, you would do it like follows: 1,2,3,4,5,6,7,8,10,11,12… Instead you do the counting like this: 1,2,3,4,5,6,7,8,9,11,12… So the easiest thing to do is to do a base conversion to base-9 and then correct the uses of ‘0’ digits by converting them to ‘9’ digits. You can do this by borrowing from the next position. So, for example, say you’re working with 18 in base-10 as the input. Converting to base-9 gives you 20 - that is 2 * 9^1 + 0 * 9^0. But that has a ‘0’. To get rid of the ‘0’ in the 1’s place, you borrow from the ‘2’ in the 9’s place to give you 19 as the final answer.

1 Like