Задача reciprocal_cycles.clj у вас решена неправильно

Open
#1,036 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
clojure
Domain
testing-qa

Research direction

Open src/battle_asserts/issues/reciprocal_cycles.clj and compare its behavior with the linked repeating-decimal table and algorithm. Verify the results for inputs up to 100, especially the cases beyond 7 and 81, and consider the issue done when the task produces the referenced correct answers.

Written by the indexing model from the issue text.

Description

https://github.com/hexlet-codebattle/battle_asserts/blob/master/src/battle_asserts/issues/reciprocal_cycles.clj
в тестах с параметром до 100 правильные ответы у вас, только 7 и 81, но это неверно, взгляните на скриншот
image
Скриншот отсюда: https://en.wikipedia.org/wiki/Repeating_decimal#Table_of_values
Там же есть правильный алгоритм вычисления: https://en.wikipedia.org/wiki/Repeating_decimal#Algorithm_for_positive_bases
Воспроизвел его здесь: https://replit.com/@AndrieiA8/hard-Task-reciprocalcycles?v=1

Dominant language
Clojure
Stars
71
Forks
67
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from hexlet-codebattle/battle_asserts

All issues in hexlet-codebattle/battle_asserts

Similar issues

More Clojure issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.