Calculator Community > Community Contests

[ENDED] Code Golf Contest #1 (thanks for the many submissions!)

<< < (2/13) > >>

JWinslow23:
No, do not check for positive-integer-ness unless you really want to. It at least has to give the right result for the test cases.
Yes, Xeda, whatever you want. Just make it work at least with the test cases.
Yes, PM me any solutions.
Yes, z80 is judged by its final size. So would Axe.
Yes, printing HAPPY/UNHAPPY would also be acceptable.

EDIT: Oh, and I will reveal all solutions in spoilers in the OP.
My own solution in TI-BASIC is 71 bytes (minus the name). Let's see who can do better...

Juju:
In some cases, printing HAPPY/SAD would be less characters.

Also can I send you more than one solution? As in, I can send you a PM as I improve?

Also my current solution is 159 bytes of Python. ._.

Hayleia:
Lol, I have 71 bytes too in TI Basic :P
Not bad for someone whose main language is Axe :P

edit just noticed how similar it is with Opti-Défis on TI Planet o.o

JWinslow23:
Juju, you then shall be the winner in Python...if nobody else does it smaller. :P But you will still get credit.
And yes, you can send me multiple PMs.

Hayleia, PM it to me so I can test it, and if it works for my test cases, you will be one of the first people to participate.

JWinslow23:
First entry!

Thanks to Juju with his 159 byte solution in Python! (counting newline as CRLF, as my OS does)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version