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.
Awesome, glad to help.
@Farekkusu I'm sorry; I'm fairly new to Codewars.. and I'm still trying to get a hang of using this.. Yes, I know what the error means. :)
@rccones1
I must of missed that when I copied out the solution...so I could reset it. I have placed it back and it works now. thanks!
Do you have using System; at the top?
Have you tried searching for the meaning of an error message?
I had to reset the kata.. due it says it was solved and it was not... when I go to run my code again... it returns the following errors.. How do I resolve? I have tried resetting it a few times.. even clearing my browser history. It worked before
src/Solution.cs(5,13): error CS0103: The name 'Console' does not exist in the current context
src/Solution.cs(15,34): error CS0103: The name 'Math' does not exist in the current context
src/Solution.cs(15,45): error CS0103: The name 'Math' does not exist in the current context
Simply add this line:
Console.WriteLine(n);
in the beginning of your solution, and you will get some lines printed in the tests output panel.I'm not sure how to do that on this site.. and where would it show up. I know how to do that in the VS..but not knowing what number is in the random test.. i'm not quite sure.
Your solution is almost good, lacks one minor fix, and fails for some specific cases. Do you know how to print input
n
and see for what numbers your solution fails? Try it for, for example,243193867
which is not prime (it can be factorized into7×34741981
), but your solution reports it as prime.This comment is hidden because it contains spoiler information about the solution