+ 20
Challenge : Evil Numbers
Convert any no. to binary and If sum of binary digits is even, no is EVIL.. Find such nos from 1 to entered limit(say x) preferably in c++ or any other language. Hit a like if u liked the challenge!! Happy Coding! Check out mine too ! https://code.sololearn.com/cjfLs6mGc4Ww/?ref=app
24 RĂŠponses
+ 13
https://code.sololearn.com/czVEjEB1X0iV/#cs
Here it is :)
+ 9
Here's mine
As simple as 1+1
https://code.sololearn.com/cjfLs6mGc4Ww/?ref=app
+ 9
@noobcoder ^_^ :D
+ 8
@Daniel Cool!!
+ 8
@ysraelcon good one!
+ 8
@HelloWorld good one!
+ 8
Here is mine
https://code.sololearn.com/cCGK158w9YQ0/?ref=app
EDIT: More than half of all nos are evil đđ
+ 8
Here's my try :
https://code.sololearn.com/cNfIHkt0Hle6/?ref=app
+ 8
@noobcoder Just like there r 10 even nos between 1 and 20 in decimal no system similarly there are 10 "even" nos in binary no system ..
I guess its some mathematical coincidence... ^_^
+ 7
See my code -
https://code.sololearn.com/cjf17k706Z6s/?ref=app
+ 6
YATP: Yet Another Try in Python :D
Have you noted that the number of Evil Numbers is aprox. the middle of the top number?
https://code.sololearn.com/cD7Yh3o2wvO5/#py
+ 5
hi, here is my code in Python:
https://code.sololearn.com/cKCqyANVTc85/?ref=app
+ 5
@On Nom: Sounds pretty logic now đđ
+ 4
Check out the code please..
Evil đđđđ Number..
https://code.sololearn.com/ck0Fb2nNI356/?ref=app
+ 4
https://code.sololearn.com/ch72iXu3cHtI/#
Check out my version!
+ 4
It's a really old challenge ... But thought I'd give it a try !
My solution in Java ...
https://code.sololearn.com/cQPNzPYTrPZ6/?ref=app
+ 3
Hello, here's my code: https://code.sololearn.com/cBkO5tRL6NNW/#java :-)