HoLyVieR
  • Member for 10 years, 10 months
  • Last seen more than 3 years ago
41 answers
48 votes
17k views
Obfuscated FizzBuzz Golf
65 votes

Javascript 97 chars - no numbers at all Numbers ? Who needs number when you have Javascript ! a=b=!![]+![],a--,c=b+b;while(++a)e=!(a%(c+c+b)),alert(!(a%(c+b))?e?"FizzBuzz":"Fizz":e?"Buzz":a); Note: ...

View answer
78 answers
47 votes
8k views
Answer to life, the universe, and everything
3 votes

PHP - 45 characters I'm surprise nobody posted any answer that used hashing. It's a very size effecient way of testing for exact string. echo md5($argv[1],1)!='¯è a@ÛÚƒ:ïT�p'?:42; The data is kind ...

View answer
30 answers
18 votes
6k views
Binary representation of a number is palindrome or not?
3 votes

Javascript - 79 77 chars alert((a=(prompt()*1).toString(2))-a.split("").reverse().join("")?"NO":"YES") More information prompt()*1 : Quick trick to convert string to number. .toString(2) : That'...

View answer
8 answers
5 votes
288 views
Power modulo golf.
2 votes

Java 56 chars My humble attempt with Java. Object a(BigInteger...a){return a[0].modPow(a[1],a[2]);} How to use : a(new BigInteger("95"), new BigInteger("56"), new BigInteger("...

View answer