Affirmative
Affirmative
Ok, took me a lot of time. But I finally did it.
But only because I was so angry about all those "yeses" and wanted to deny^^
Is there any other way to solve this challenge than letting your anger solve it?
But only because I was so angry about all those "yeses" and wanted to deny^^
Is there any other way to solve this challenge than letting your anger solve it?
Re: Affirmative
You noticed the capital letters?
My solution in bad Perl:
where @chars contains the hex values.
Code: Select all
print $_ == 0 ? chr(hex($_)) : $_ < 60 ? "*" : " " foreach @chars;
I like your neat solution. However, it could be written a bit more compact:or even "worse":Nevertheless, the shortest solution I found so far is
Code: Select all
print$_+0?$_<60?"*":" ":chr hex for@chars;
Code: Select all
print chr($_+0?42-($_&64)/7:hex)for@chars;
Code: Select all
print chr($_+0?3+($_<60).2:hex)for@chars;
Indeed, it was a bit lengthy:
Code: Select all
print chr(-$_?3+($_<60).2:hex)for@chars;
I think it's still lengthy:
Code: Select all
print chr(-$_?3+($_<60).2:hex)for@chars
It seems that you are the better golfer here. So, putt it in, please. Perhaps you might also want to take a look at http://golf.shinh.org/.
-
- Posts: 20
- Joined: Mon Jun 20, 2011 6:25 pm