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.
Can someone tell me if my logic is wrong or there is a bug?
Description says: generate(1,3) should create 3 sets of numbers (for number 1, 2 and 3)
So logicly generate(1,2) should generate 2 sets of numbers (for 1 and 2)
but tests in PHP for generate(1,2) wants only 1 set of numbers.
Acually it does "Your task is to create a function that..." implies to calculate the solution no "find" a trick to pass the tests (Even sample tests suggests I have to perform calculations). And I get it, I'm new here and assumed ever challenge requires you to write a code, not return one word/number because there is a trick to the challenge. I guess I learned that if challenge is too hard for its rank there may be a trick to it. ( But still author should not be lazy and write a real solution for 536! so I can learn something ;P ) Cheers
So this challenge asks you to understand Wilson prime, write Factorial function because your language doesn't have it (D lang) and optimase the function to handle numbers like 536! and it's 8kyu? My last 8kyu asked me to convert int to string.
Now works perfectly! yay, Thank You ;)
I asked someone to show me D Lang translation Solution.
I think the line c = 1 << c; should be c = 1UL << c;
Wihout this it goes over int and wrap around.
I'm new to this but I'm sure my code is correct and translation is incorrect.
This comment is hidden because it contains spoiler information about the solution
I had a chance to use foreach_reverse. yay ;)
Good day to practice std.algorithm ;)
Today I learned how to convert decimal number to binary. yay ;)
Every time I do simple kata a learn new think from std.math. Thanks ;)
I feel like I'm learning ;)
couldn't make it simpler ;/
Today I learned something new.
This is the best challenge if this is your first day programming.
Messy answer that works means you are learning ;P
Loading more items...