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.
3 solutions did get invalidated because of this fixed test. Are random tests missing these edge cases?
Thanks, I fixed it.
All of the sample tests have the same message "Sample test failed for N=10, K=4".
Thank you. I've added sample tests and fixed tests.
Thank you. I've added the fixed test.
I don't think it is necessary. Everything works for
K > N
. Maybe there are should be some fixed tests withK > N
.Add more fixed tests and sample tests (perhaps you forgot to save/publish your change from the previous issue?)
should also add
K <= N
?Tests with
k = 1
should be removed from Random Tests:K = random.randint(1, 10**12)
should be replaced withK = random.randint(2, 10**12)
(don't forget Mini random tests also).The description should be updated:
2 <= K <= 10^12
(maybe it is better to use KaTeX and write:$2 \le K \le 10^{12}$
).I also suggest to change the first sentence into "You are given a positive integer N and an integer K > 1."
Yeah okay,
f(n,1) = n
; I was already summing for allN
.The current definition doesn't work when
$k=1$
:From tests,
$f(n, 1) = n$
Thank you. I've added more.
There should be more fixed tests (including tests with small
k
).Isn't this a matter of defining
f
in a way that allowsk = 1
? Intuitively,f(n,1) = n * n+1 / 2
.Thank you, I have fixed it now.
Loading more items...