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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
The input proportionals is now presented as a list of Decimal.
...
...
Why should we count 88 * 0.529 = 46.5519999999999996?
Why do you expect inequality 0.552 != 0.5519999999999996?
Why should we rely on the results of an inaccurate representation?
Decimal(str(0.529)) -> Decimal('0.529')
What is wrong here?
.
88 * 0.529 = 46.552
Try this:
Don't write about the float type.
How you implement the algorithm is up to you.
You can convert float (0.529) to Decimal and work with it.
Floating point numbers are generated in exactly 3 decimal places.But as several existing solutions show, the use of Decimal is optional.
And the output is an array of integers.
We don't compare fractional numbers. We compare integers.
Added details to the description of the examples.
Added details to the description of the examples
There are 11 tests in the sample tests.
Codewarrior's task is to look at the examples as well as these tests.
The task is partly logical.
A little intuition, and the task will become clear.
.
.
Loading more items...