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.
In python the function to be implemented is called max_min, while the testcases expect max_and_min
The description given is misleading. The wiki link given there says (first sentence)
" ...the greatest common divisor (gcd) of two or more integers, ..., is the largest positive integer that ..."
gcd is explicitly defined to be positive. In the Kata it took me quite some time to figure out how to treat negative numbers.
I was not aware of gcd from fractions, which I saw in the solutions.
To make this Kata solvable without using this, it should be explained how to treat negative numbers!
Or just use the common definition, as given on the wiki link, including gcd(a,b)>0 and gcd(a,b) = gcd(b,a), which are both not fulfilled here
Nice kata, thanks. In Clojure, I found it harder than 7 kyu compared to others...
Took me more time to solve this Kata than many 4kyu Katas...
I had to figure out how to use ÄÜÖüöä etc. with C++, never done this before,
and I could not find a solution manipulating single characters...
Thanks, first time learning something from a 7kyu Kata ;-)
Why is w>h and 0<b<1 considered an invalid input?
This is a decent setup and should return 0 instead of -1.
This would render many solutions invalid, including mine...
This comment is hidden because it contains spoiler information about the solution
Fully agree.
I have done some annoying trial and error to find the correct rules.
This should be explained in detail in the description, otherwise it is impossible
to solve the Kata with the first try.
There should further be a comment that strings between angle brackets <...> are not shown
on stdout/stderr (with C++). That also bothered me at the beginning for some time.
I do not get the test framework running with C+++. It says:
Any hints? thankS!
Nice kata, thanks.
In python there is this ugly rounding issue, see
http://stackoverflow.com/questions/10825926/python-3-x-rounding-behavior
which I circumvented by a dirty unsafe trick adding 1e-6.
But otherwise it gives the wrong result. Which rounding you use in python?
I think has to clarified explicitly, due to different conventions.
Read the description carefully, it says:
"When two numbers have the same "weight", let us class them as if they were strings and not numbers"
And, as a string, 11 is before 2000.
I agree, it is straightforward, no traps, should be 5kyu or even 6kyu...