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.
Lol it only made sense to me after I read your explanation. Thank you!
This problem statement is not great.
The table and column names should be clear and consistently formatted.
Table name:
people
Column names:
id
(PK int),age
(int),otherdata
(datatype),...
Formatting is not very thorough in these problems.
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 most offensive line is "Count the number of digits
d
used in the writing of all thek**2
"Very unclear.
It should be written as "Count the number of occurrences of digit
d
in all squared values between 0 and n inclusive"Also, the phrase "Note that
121
has twice the digit 1"Is a little off, and should be written "Note that 1 appears twice in
121
"Is it necessary to write "Square all numbers
k (0 <= k <= n)
between 0 and n"when "Square all numbers between 0 and n inclusive" would suffice?
Specifying that digits fall between the range of 0 and 9 inclusive is redundant; using a base 10 digit system is implied.
Revised Problem Description:
Return the number of occurrences of digit 'd' in the set of squared numbers between 0 and n inclusive
Constraints:
(0 <= n <= 1_000_000)
# NOTE: The problem theoretically includes infinitely large numbers. There should be a constraint for n other than n >= 0. Also, neither k nor d need to be specified as a range.
Revised Examples:
Understood.
Please use spoiler flag next time.
Seconding what everyone else said, this description is confusing and unhelpful, especially for a 7-kyu problem. Provide more examples and make it more clear, please.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Variable names evoke sadness
Clever, but not efficient. Nit: should space around operators by default to improve readability.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...