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.

Messages - JWinslow23

Pages: 1 2 [3] 4 5 ... 40
Community Contests / Re: Code Golf - The Reboot #5
« on: June 30, 2015, 11:31:12 pm »
Entry submitted, 217 bytes in java. 8) ;D
And also JWinslow please count compiled programs (axe included) in source size. @pimathbrainiac and I now both agree that all compiled languages should be counted in source size.
Edit: do you have a Programing Puzzles & Code Golf acount on stack overflow? If not can i cross post the question?
Noted. Will change rules accordingly.
Also, if I do, I don't use it anymore.
Are the following acceptable truthy and falsy results:
  • 2 and 0
  • no error and error
  • 1 and no output
Is there a minimum input value up through which the program must return correct results?
2 and 0 is acceptable, no error and error is not acceptable acceptable only if the output is the same for every truth and the same for every false, 1 and no output is acceptable. Also, the output for truth and false must be the exact same to the letter for every truth and false result.
And the minimum (also for determining them in the first place; 1 digit numbers are trivially Keith numbers) is 10. Which is not a Keith number (1+0, 0+1, 1+1, 1+2, 2+3, 3+5, 5+8...).
Lua, 152
JS, 112.

(counted both with the "function K(n)" header)
Counting the header (deducting the header only applies to TI-83/84/+/SE submissions) and accepting.

Community Contests / Re: Code Golf - The Reboot #5
« on: June 29, 2015, 08:43:10 pm »
Can the output for "false" be an infinite stream of "false"-s?
And can the output for "true" be an infinite stream of "false"-s? with a "true" somewhere in the middle?
Other than that i'm about done :D
No. The stream cannot be infinite. But it must somehow be unique for true and false, and distinguishable.
Actually my conditional exit turned out to be smaller then an infinite one :P
Oh, and it must be the same for all truthy and falsy results.
However this part may trip me up about 20 bytes :(
Edit: I presume the only input provided is the integer to be tested, 'N' and that 'D' is not provided. Am i right?
Yes. D is simply to illustrate the number of digits in a way that wasn't int(log(N))+1 :P

Community Contests / Re: Code Golf - The Reboot #5
« on: June 29, 2015, 07:54:06 pm »
Can the output for "false" be an infinite stream of "false"-s?
And can the output for "true" be an infinite stream of "false"-s? with a "true" somewhere in the middle?
Other than that i'm about done :D
No. The stream cannot be infinite. But it must somehow be unique for true and false, and distinguishable.

Oh, and it must be the same for all truthy and falsy results.

Community Contests / Re: Code Golf: The Reboot #4
« on: June 29, 2015, 04:15:37 pm »
Challenge has been posted and crossposted!

Community Contests / [ENDED] Code Golf - The Reboot #5
« on: June 29, 2015, 03:47:53 pm »
Everybody back off, I'm taking back this contest :P

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


You, a person with a lisp, go to your car, and unlock it with the keys...but there's one 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.


14 is a Keith Number:
Code: [Select]
N = 14
D = 2

1 + 4 = 5
4 + 5 = 9
5 + 9 = 14
197 is a Keith Number:
Code: [Select]
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:
Code: [Select]
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


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).


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.

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

1@Adriweb152Jun 30 2015 02:06:20 am

1@Adriweb112Jun 30 2015 02:06:20 am

1@c4ooo190Jul 01 2015 12:32:49 pm

1@Juju150Jun 30 2015 04:57:53 pm

1@Cumred_Snektron83Jul 01 2015 10:37:07 am

Language Ranking
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.

Community Contests / Re: Code Golf: The Reboot #4
« on: June 27, 2015, 01:24:28 pm »
Well, no matter the activity on this one, this is only a minor hiccup. It's just a note to future challenge makers on what to try and avoid in their challenges: stuff people don't know about and is hard to do even if you do know about.

Community Contests / Re: Code Golf: The Reboot #4
« on: June 26, 2015, 08:02:24 am »
Reminder that I only recieved one entry. And it's mine. ._.
I dunno about this for a challenge, really. Not many people understand how to make that kind of stuff :P

...I'll do SOMETHING in GS or CJam. it hasn't been a few minutes and I barely understand the algs out there, and I don't wanna steal already-golfed answers from StackExchange

See, the thing is, the name of the OUTNAME program could affect the size, too. But really, what I think should be the sizing for Axe is the binary size. It compiles to Asm anyways.

Community Contests / Re: Code Golf - The Reboot #3
« on: June 18, 2015, 12:49:15 pm »
@pbfy0 what language are you using? That sounds fast for Axe, especially golfed Axe.

I managed to shave one more byte, but now my code takes two hours per frame. I hope you have the patience to test it, c4ooo...
Well, doesn't the emulator Wabbitemu have an option to run TI-83/84/+/SE code at 1600% speed or something? That would mean about 7.5 minutes per frame :P

Community Contests / Re: Code Golf - The Reboot #3
« on: June 15, 2015, 11:43:08 am »
EDIT: That pun was probably the worst in the history of code golf.

Well, to be fair, this reboot series doesn't have a lot of "history" :P

I promise you, the next pun will be better ;)

Community Contests / Re: Code Golf - The Reboot #2
« on: June 14, 2015, 07:00:09 pm »
Yeah. The contest is over. I will post up the results and solutions in just a minute.
Can't wait for Juju's contest. :)

Community Contests / Re: Code Golf - The Reboot #2
« on: June 13, 2015, 10:11:00 am »
Axe is supposed to be counted in Source bytes...
I've always counted Axe as the final program size. For various reasons.

I don't think that it should be a separate category, as else for languages like php you'd have to make a separate category for every module you use because it might be disabled in the php.ini .
...OK, then I guess MATHPRINT-only commands are disallowed.

Community Contests / Re: [ENDED] Code Golf Contest #9
« on: June 12, 2015, 02:27:08 pm »
I agree, Sorunome.

I guess I'll post in the threads corresponding to the challenges then, even if they're old, as long as I can contribute something. Does anyone have a differing opinion?
Contribute away. :)

It looks like we've reached a consensus that, with the [ENDED] tag to clear things up, on-topic necroposting is allowed for after-the-fact optimizations or programming/golf tips. Therefore:

The only optimization I see in the top two TI-BASIC solutions is that on a MathPrint calculator, cumSum(binomcdf(14,0 can be randIntNoRep(1,14, saving two bytes at the cost of speed, since order does not matter. Either calc84maniac or Runer112 could have won the contest outright at 44 bytes if they had done this. Both of them noticed that If A≠1 could be optimized to If log(A, which is small but hard to notice.
Well, I didn't have a MATHPRINT calculator (and others here don't either...take Zeda/Xeda, for example), and I had to be able to test the solutions myself. If anybody makes a solution that requires any TI-84+ OS 2.53 or over, we should make that a separate category. In my opinion.

Pages: 1 2 [3] 4 5 ... 40