Join us on Discord!
You can help CodeWalrus stay online by donating here.
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - JWinslow23

#721
Updated!
#722
Quote from: Unicorn on June 30, 2015, 01:24:08 AM
Ah... So I don't quit get it, As the result I have to make it display the whole tree, or just the final answer?
As a result, you just need to tell me if the input N is a Keith number. The code tags are just so you know how such determination works. Output may be anything, but it must be different for true and false. And you must specify what means true or false.
#723
Quote from: Unicorn on June 29, 2015, 11:16:03 PM
Ummm Are the dates wrong? 1970? Is there some reason that is?
Nobody has submitted an entry yet. That's the Unix epoch :P
#724
Everybody back off, I'm taking back this contest :walrii:

Hello, Omnimaga/CodeWalrus/Cemetech/my girlfriend/whoever is seeing this right now, and welcome to the fifth installment of...
Code Golf: The Reboot

As you can see, I'm neither @pimathbrainiac NOR @c4ooo , NOT EVEN @Juju , but I am the original @JWinslow23, the one who came up with this silly idea in the first place almost a year ago. However, don't expect me to host next time, or basically for the next few competitions. How it works is, there's this cycle of hosts that will successively host this competition, starting with pimath. Somewhere in that loop, there's yours-truly, with a challenge on deck to give you. This is that.

Don't know what code golf is? Check out this contest thread OR this really old contest thread for an explanation. Don't know what code is? Then you will not understand this website in general :P

Without further ado...

Challenge 5

Problem

You, a person with a lisp, go to your car, and unlock it with the keys...but there's one problem...you don't have your keys with you.

"Oh no...I lotht my keith! Where'th my car keith?" you exclaim in nervousness. You know that you have more than one pair, but you can't for the life of you find any of them.

Suddenly, you remember...each of your keys had a number on it 10 or above, each of which you call a Keys Number, or "Keith Number". Now, these numbers have a special property:

For a number N with D digits, if you arranged the digits to make a Fibonacci-like sequence where the digits of N are the first few terms, and each number is the sum of the D preceding digits, it would have N somewhere in the sequence.

Examples:

14 is a Keith Number:N = 14
D = 2

1 + 4 = 5
4 + 5 = 9
5 + 9 = 14
197 is a Keith Number:N = 197
D = 3

1 + 9 + 7 = 17
9 + 7 + 17 = 33
7 + 17 + 33 = 57
17 + 33 + 57 = 107
33 + 57 + 107 = 197
1337 is NOT a Keith Number:N = 1337
D = 4
1 + 3 + 3 + 7 = 14
3 + 3 + 7 + 14 = 27
3 + 7 + 14 + 27 = 51
7 + 14 + 27 + 51 = 99
14 + 27 + 51 + 99 = 191
27 + 51 + 99 + 191 = 368
51 + 99 + 191 + 368 = 709
99 + 191 + 368 + 709 = 1367
Your mission: Help yourthelf find your keith!

Make a program that, given an integer input 10 or above, will tell you whether or not it is a Keith number.

Any output is permitted, but the output must be different for a truthy and falsy result, and the two different outputs must be specified to me so I know the difference. Finally, if the size of the program is exactly 1337 bytes...then that'd be kinda cool... :P

Scoring

All non-calc languages will be scored with this counter.
Assembly and compiled Axe programs will be scored on binary size (minus the header), and TI-BASIC will be scored on on-calc source size (again, minus the header).

Submission

PM me over on Omnimaga, Cemetech, or CodeWalrus, or tell my girlfriend and have her dictate the code to me. (If you take the latter option, I will give your code a -90% point bonus. I'm serious.)

Good luck! Remember, don't steal code from others; I want everyone to not fib and not cheat.

TI-BASIC





RankUserSizeDate
1@lirtosiast43Jul 01 2015 02:25:25 pm
2@PT_43Jul 02 2015 01:24:20 pm
3@mr womp womp97Jun 30 2015 09:13:00 pm

Lua



RankUserSizeDate
1@Adriweb152Jun 30 2015 02:06:20 am

Javascript



RankUserSizeDate
1@Adriweb112Jun 30 2015 02:06:20 am

Java



RankUserSizeDate
1@c4ooo190Jul 01 2015 12:32:49 pm

Ruby



RankUserSizeDate
1@Juju150Jun 30 2015 04:57:53 pm

Python



RankUserSizeDate
1@Cumred_Snektron83Jul 01 2015 10:37:07 am

Language Ranking








RankLangUserSizeDate
1TI-BASIC@lirtosiast43Jul 01 2015 02:25:25 pm
2Python@Cumred_Snektron83Jul 01 2015 10:37:07 am
3Javascript@Adriweb112Jun 30 2015 02:06:20 am
4Ruby@Juju150Jun 30 2015 04:57:53 pm
5Lua@Adriweb152Jun 30 2015 02:06:20 am
6Java@c4ooo190Jul 01 2015 12:32:49 pm

As I am having trouble with formatting, everyone's code has been put in a Pastebin paste here.
#725
Quote from: Cumred_Snektron on June 23, 2015, 04:34:53 PM
But some languages are just cheating <_<
Well, languages like HQ9+ are disallowed trivially :P
#726
Quote from: Unicorn on June 22, 2015, 09:13:14 PM
Yes, TI BASIC is the best language for CodeGolf :D
Only on occasion. Usually Golfscript and CJam beat it out.

I mean, winning entries for displaying 1337 in:

TI-BASIC (9): int(pi^^2^pi+int(epi

Golfscript (9): !.))...+)

CJam (4): DHK+

And for searching for the letters in the word "CODE" in order in:

TI-BASIC (50):
Input Str1
1
For(X,1,4
inString(Str1,sub("CODE",X,1),Ans
If not(Ans
ClrHome
Disp Ans
If not(Ans
Return
End

Golfscript (55): 0:a;{.96>32 0if-}/]"CODE"{1$?.a+:a\@>}/;]..$=*.{n*}0if

There's no clear-cut winner. :P
#727
Quote from: DJ Omnimaga on June 22, 2015, 02:26:27 AM
Yeah true. That said, IIRC Code Golf contests are slightly about choosing the right language/platform, right? Because some Code Golf entries can only be done small in certain languages it seems.
And sometimes that language is not what you'd think. Sometimes, something can be done the smallest in TI-BASIC. That's right, it even beat Golfscript and CJam.
#728
Quote from: DJ Omnimaga on June 20, 2015, 12:31:42 PM
Yeah that's why I included them. Since the contest mainly focused on creativity rather than programming and performance, this is why entries competed against each others and included all platforms I own. The only issue was pure TI-84+ BASIC and such languages, due to lack of grayscale support and speed problems, but JWinslow23 still managed to get the most out of that language and get 2nd place.
And if that few-pixel border wouldn't have been there, I'd be 2nd place+1 point. :P

But yeah. I wasn't sure what was so hard about it, once I figured out the best way to do it fullscreen :P
#729
Congrats to Scipi and unknownloner!
#730
Quote from: Cumred_Snektron on June 15, 2015, 03:55:51 PM
Well, DJ still has a 40% share of his vote thinglys
That was sarcasm. But can you imagine?
#731
Looks like the voting was a tie between brentmaas' PixCiv in Java, my Bitty Bird in TI BASIC, and unknownloner's web-based ColorZ.

So, we ALL get 1st place medals? :P
#732
Woo! Excited about the results tomorrow(?)!
#733
Quote from: Cumred_Snektron on June 14, 2015, 08:37:27 PM
It looks like you have a new opponent:

Heh. He knows the rules, and so do I. A full commitment's what he's thinking of. We know the game, and we're gonna play it. ;)
#734
Quote from: aeTIos on June 12, 2015, 06:48:37 PM
I'm kinda missing the point of this thread? Maybe?
The point of this thread WAS to pass around the name Ida Nomuch as a serious candidate for Student Council President.
#735
UPDATE: School has ended, but I DID notice that one of the posters I thought was taken down (by the cafeteria) actually got moved to INSIDE the cafeteria, on one of the defunct TVs. Weird.
Powered by EzPortal