s.charAt(i) - returns the character code from the ASCII table. The number codes are sequential: '0', '1', '2' ... '9' or in the form of code 48, 49, 50 ... 57. For example, "2".charAt(0) = '2' or 50 (character value and code), but we need to get the number 2,to do this, we just need to subtract the character code '0' (48). "2".charAt(0) - '0' = 50 - 48 = 2

Great kata! In the java version, there is a typo in the class name "FixProgession" instead of "FixProgression" (there are no errors in other languages with the class name).

I suppose a typo in the task description, it should train 2 hours and not 3.
Original text: Gooble that starts with S=100 and a schedule that reads TTCCB would instruct the Gooble to train for 3 hours

At last I understood your problem... Note that if (-e, -f) or (-e, f) or (e, -f) is a solution (e, f) is a solution too. So you don't have to eliminate a number if it is negative but simply take its absolute value. "(e and f integers >= 0)" in the task means that you have to return only the positive values taking the absolute values. I hope I am clear but I am not sure of that:-) Cheers.

According to the text of the task "(e and f integers >= 0)", but in tests they can be negative. Until I removed the checks for negativity, I could not pass the tests.

It's kind of specified:

I have attempted to translate to Ruby

It seems that the tests do not take into account some cases, such as

assertEquals("32 is 17+3+3+3+3+3", 6, CodeWare2.solve(32,new int[]{17, 14, 3}));

The tests correspond to a simpler task, and you probably need to specify it in the description.

s.charAt(i) - returns the character code from the ASCII table. The number codes are sequential: '0', '1', '2' ... '9' or in the form of code 48, 49, 50 ... 57. For example, "2".charAt(0) = '2' or 50 (character value and code), but we need to get the number 2,to do this, we just need to subtract the character code '0' (48). "2".charAt(0) - '0' = 50 - 48 = 2

Why is there -'0' included ? What does it mean ?

It was difficult and very interesting!

Great kata! In the java version, there is a typo in the class name "FixProgession" instead of "FixProgression" (there are no errors in other languages with the class name).

Fixed, thanks for your feedback!

I suppose a typo in the task description, it should train 2 hours and not 3.

Original text: Gooble that starts with S=100 and a schedule that reads TTCCB would instruct the Gooble to train for 3 hours

At last I understood your problem... Note that if (-e, -f) or (-e, f) or (e, -f) is a solution (e, f) is a solution too. So you don't have to eliminate a number if it is negative but simply take its absolute value. "(e and f integers >= 0)" in the task means that you have to return only the positive values taking the absolute values. I hope I am clear but I am not sure of that:-) Cheers.

lmao

According to the text of the task "(e and f integers >= 0)", but in tests they can be negative. Until I removed the checks for negativity, I could not pass the tests.