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.
It would also be more correct since
pow
returns adouble
, which gets imprecise atn = 94906269
.i love it
This comment is hidden because it contains spoiler information about the solution
Yes it was the problem, you had the same var name in both loops conditions RomperCondicion5 (or 3, can't remember and you've changed your code now), but you had different var names inside, RomperCondicion3 and RomperCondicion5. So, instead of exiting the loop, it was running until it timed out because the changes you made to one var didn't affect the other. Well, that's a good reason to keep your code dry (dry = don't repeat yourself). Read this please: https://docs.codewars.com/training/troubleshooting
no its not, the real problem was the a lot loops there is in my code. But my code pass all tests without any problem except the last. Because, one the test is a random test like a number of 5 figures when my code try to solve it, is when the time begins. But thanks i resolve it, i eliminate some innecesary lines and works now
You have a typo in your code and it has an infinite loop. Not a kata issue.
You can add it into collection --> read more info here
i have a problem, the page said me my code is very slow(12000ms) but when i test it on my pc its works fine like Tiempo de ejecuci├│n(execution time): 186 microsegundos(microseconds). I think its internet
s speed
. Somebody Can affirm this ?how i can save this kata¿
papaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa q grande eres ! como q 3 lineas de codigo mi hermanooooooooooooooooooooooooooo... felicidades.
This comment is hidden because it contains spoiler information about the solution
yes i understand! thanks.
Write a function that will return
the count of
distinct case-insensitive alphabetic characters and numeric digits
that occur more than once
in the input string.
In
indivisibility
the letteri
occurs6
times. It is the only letter that occurs more than once. So, the correct answer to this test is1
.#include <criterion/criterion.h>
#include <stddef.h>
size_t duplicate_count(const char* text);
Test(Sample_Cases, should_pass_these_three_tests) {
cr_assert_eq(duplicate_count("abcde"), 0);
cr_assert_eq(duplicate_count("abcdea"), 2);
cr_assert_eq(duplicate_count("indivisibility"), 6);
} these are the corrects tests , because in the original we have the second and the third one wrong , the letter i repeats 6 times but in the original say ONE ! ( i think this is wrong=)