Skip to content

Conversation

@IamMusavaRibica
Copy link
Contributor

Bug:
image
image

Fix:
image
image

Copy link
Member

@NopoTheGamer NopoTheGamer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't test but the good looks good

@IamMusavaRibica
Copy link
Contributor Author

IamMusavaRibica commented Jul 11, 2024

Here's an explanation for those who don't want to spend time thinking about it:
A , is put before last group of digits. If lastComma = n, then indexes of the characters up to the comma are 0, 1, ..., n and the last digits have indexes n+1, n+2, n+3, therefore amount.length() should equal n+4, but if digits are missing, it's smaller, so amount.length() = n+1+visibleDigits, from where we can get visibleDigits = amount.length() - lastComma (n) - 1, and 3 - visibleDigits is how many zeroes we have to add. I tested it in a real contest
image
and it gave correct results. the (detected line: ) in this image shows the amount variable

@lineargraph lineargraph merged commit d16616f into NotEnoughUpdates:master Jul 11, 2024
@IamMusavaRibica IamMusavaRibica deleted the contestestimatefix branch July 11, 2024 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants