[Community Puzzle] Rugby score

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Hi,

Today, I make the rugby score puzzle…

I think there’s a problem in the IDE test.

This is a print screen… I don’t understand the response order expected… Not the same that in the first test ???

Thanks for your help

after a try, a transformation kick is played and is worth 2 extra points if successful

When you need a try first to get that kick, how can you have more points by kicks than by tries?
0 3 0 is not a valid solution

You might want to recheck your calculations, the 3 options in your screenshot don’t add up to the same value.

Ok I understand know…

The second number is only for transformation not for try with no transfomation…

So, one try with no transformation return expected 1 0 0

Thank you

Regards

this looks like it is totally broken to me. i submit 3 0 0 and it tell me that i need 0 0 5 but both add up to 15, so how is my answer incorrect? or am i missing something about rugby?

You need both of them (and all other combinations which result in the same score).

Also, they need to be sorted and 3 0 0 should be after the 0 0 5 answer. That’s why it tells you you need 0 0 5 when you have 3 0 0.

1 Like

thanks for your reply :slight_smile:

I also do not understand what order these are to go in: Test1

Standard Output Stream:

2 1 0
1 2 1
0 6 0
0 3 2
0 0 4

Failure

Found:
2 1 0
Expected:
0 0 4

after a try, a transformation kick is played and is worth 2 extra points if successful

There can be no transformation without a try.

I just submitted my Rugby Score and it validated fine as 100% although Test 4 in the IDE timeouts. (Maybe recursion was not the best idea or I should have optimized it more…)

Loved it. I spent hours thinking on a recursive solution where the iterative one was way easier.

Hi,
It is possible to know the values ​​of the Validator 2 ?
All test pass on IDE, and i don’t understand why the Validator 2 doesn’t pass.
I use an interative method and I have the condition transformation<=try.

Thanks.

Here you go

Input

16

Output

1 1 3
2 0 2

1 Like

Thanks
I saw my mistake, I have an infinite loop.

Hello,
Today I have finished solving this puzzle and I passed all the tests without problem.
However, when I try to pass validators 1 and 4 I am not as lucky.
Trying combinations on my own I have found a couple of bugs but I still do not know why it does not work.
If someone can help me it would be great.
Thanks!

Ok, I fnally found my error :sweat_smile:

It has helped me a lot to find that with multiples of 10 (eg 20, 30,40 …) the solution will always be the same number 3 times and that at the same time it coincides with entry/10 .
e.g. entry = 30
sol: 3 3 3

1 Like