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.
done
I think that the first line of the instructions would be better phrased as:
'Let be n an integer coprime with 10 e.g. 7.'
The description says to return 'null' in C#, 'None' in Rust, etc. It doesn't say anything about return types in R.
I think your point stands for the 'R' version though, because it is disproportionately difficult in R for an 8 Kyu kata - no beginner R programmer is going to think of the difference in return types between 'return(NULL)' and 'return(NA)'.
I agree with you that the R version really needs a hint to use an 'NA' return type.
My bad - I mixed up Wilson numbers (which include 1) and Wilson primes (which do not).
But 1 is not a prime at all, and Wilson primes are prime numbers with additional restriction. Since 1 is not a prime number, it cannot be a Wilson prime?
In Python the test case P = 1 gives an incorrect result of False.
This should be True.
((P-1)! + 1) / (P * P)
((1-1)! + 1) / (1 * 1)
= ((0)! + 1) / (1 * 1)
= (0! + 1) / 1
= (1 + 1) / 1
= 2 / 1
= 2
Since the result is an integer, P = 1 is a Wilson Prime is True and the test case should pass.