Ad
  • Custom User Avatar

    3 solutions did get invalidated because of this fixed test. Are random tests missing these edge cases?

  • Custom User Avatar

    Thanks, I fixed it.

  • Default User Avatar

    All of the sample tests have the same message "Sample test failed for N=10, K=4".

  • Custom User Avatar

    Thank you. I've added sample tests and fixed tests.

  • Custom User Avatar

    Thank you. I've added the fixed test.

  • Custom User Avatar

    I don't think it is necessary. Everything works for K > N. Maybe there are should be some fixed tests with K > N.

  • Custom User Avatar

    Add more fixed tests and sample tests (perhaps you forgot to save/publish your change from the previous issue?)

  • Custom User Avatar

    should also add K <= N ?

  • Custom User Avatar
    • Tests with k = 1 should be removed from Random Tests: K = random.randint(1, 10**12) should be replaced with K = 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."

  • Custom User Avatar

    Yeah okay, f(n,1) = n; I was already summing for all N.

  • Custom User Avatar

    The current definition doesn't work when $k=1$:

    1. If it is divisible (always), divide the quotient by 1 again
    2. If it is not divisible by 1 (never), end the operation.

    From tests, $f(n, 1) = n$

  • Custom User Avatar

    Thank you. I've added more.

  • Custom User Avatar

    There should be more fixed tests (including tests with small k).

  • Custom User Avatar

    Isn't this a matter of defining f in a way that allows k = 1 ? Intuitively, f(n,1) = n * n+1 / 2.

  • Custom User Avatar

    Thank you, I have fixed it now.

  • Loading more items...