7 kyu
Last Digit to Appear in Sequence of Powers
309 of 337RazNaot
Loading description...
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
python new test framework is required. updated in this fork
Approved
Ruby 3.0 should be enabled, see this to learn how to do it
Please organize the structure of test fixture as following (although it has been mentioned in the attached link, I'm repeated here again)
Enabled in this fork
Ruby translation kumited -- please review and approve.
Awesome... approved!
Can somebody explain me the task...?
You are given number n. Look at its powers. For example for n=13: powers of 13 are -
13, 169, 2197, 28561, 371293, 4826809...
Now, what digit (from 0 to 9) was the last that was written down? It's 0. You can see that all other digits appeared before it somewhere.thank you, i solved the task)
Hi,
you need to enforce some inifinite loops in the random tests too.
I added some forced cases into the random tests. Do they still count as random? hmm... btw - can you check and see my code for the tests? It's my first authored kata, not sure about that.
:+1:
About the tests, you don't use performant operations, but since there is no perf requirements, that's not a problem. For more efficiency, use sets instead of lists (both in your reference solution and for
notRandom
)Note: in python, you should use
snake_case
function names, normally