This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. TI-Basic Brain Teasers => TI-BASIC
Author Message
TheStorm


Calc Guru


Joined: 17 Apr 2007
Posts: 1233

Posted: 31 Aug 2007 10:11:44 am    Post subject:

Harrierfalcon wrote:
If it took Goose some real thinking to figure it out, then you can be sure than only a select others will be able to think of it within 24 hours.

/me is still twiddling...

EDIT:  Storm?
Quote:
102→K:10fPart(.1K)+17)-
3int(.1K-3
                                    -2
Try again.

EDIT#2: Hehe, I can shave off a single byte after 30 minutes of thinking. XD
[post="111924"]<{POST_SNAPBACK}>[/post]

How many times do I have to say it gooses challenge says 1-9 It doesn't need to work for 0
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 31 Aug 2007 10:47:06 am    Post subject:

It wouldn't even make sense for it to work for 0 - then you wouldn't be able to distinguish the lack of a key press from pressing the [0] key.
Back to top
TheStorm


Calc Guru


Joined: 17 Apr 2007
Posts: 1233

Posted: 31 Aug 2007 10:55:38 am    Post subject:

Very true I didn't think of that weel Unless you are using a repeat getkey then you know that a key was pressed.
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 31 Aug 2007 11:18:10 am    Post subject:

TheStorm wrote:
How many times do I have to say it gooses challenge says 1-9 It doesn't need to work for 0
But it does need to show [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]102 when you press [0], not [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]‾2.
Back to top
TheStorm


Calc Guru


Joined: 17 Apr 2007
Posts: 1233

Posted: 31 Aug 2007 11:22:38 am    Post subject:

I know the conditonals I add that push over 34 bytes solve that issue.
Back to top
calc84maniac


Elite


Joined: 22 Jan 2007
Posts: 770

Posted: 31 Aug 2007 11:48:39 am    Post subject:

Beat ya Weregoose, 29 bytes! :biggrin:
Quote:
:K-13int(.1K-2)(12>abs(K-83) and .2<fpart(.2K


Last edited by Guest on 31 Aug 2007 12:01:50 pm; edited 1 time in total
Back to top
TheStorm


Calc Guru


Joined: 17 Apr 2007
Posts: 1233

Posted: 31 Aug 2007 12:14:45 pm    Post subject:

Nice job calc84 Smile
Edit: check your math it is 38 bytes minus the name.[attachment=1862:attachment]


Last edited by Guest on 31 Aug 2007 12:28:32 pm; edited 1 time in total
Back to top
calc84maniac


Elite


Joined: 22 Jan 2007
Posts: 770

Posted: 31 Aug 2007 12:58:54 pm    Post subject:

Here's 36 bytes minus the name:
Quote:
:K-13int(K/13(12>abs(K-83) and .2<fPart(.2K
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 31 Aug 2007 01:38:28 pm    Post subject:

Here's my first try, 48 bytes (I was so excited when CalcSys said 30 bytes, but then I remembered it's hex Sad). I'm pretty sure there's something I can do to compress the conditionals, but I forget how to do it, because I never paid much attention to GetKey input optimization...
Quote:
0
If K>91 and K<95
91
If K>81 and K<85
78
If K>71 and K<75
65
Disp K-Ans


Update: 38 bytes (still not there yet):

Quote:
K-91(2>abs(K-93))-78(2>abs(K-83))-65(2>abs(K-73


Last edited by Guest on 31 Aug 2007 01:59:08 pm; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 31 Aug 2007 03:40:04 pm    Post subject:

magicdanw: you're counting the size of the code slightly differently from Goose. While you are counting the size of just the code itself (or equivalently, the size of the program minus the size of an empty program) Goose is counting the size of the program minus the length of the title. There's a 9-byte difference.

calc84maniac wrote:
Here's 36 bytes minus the name:
Quote:
:K-13int(K/13(12>abs(K-83) and .2<fPart(.2K

[post="111969"]<{POST_SNAPBACK}>[/post]

Some optimization got me to 32 bytes, not counting the title length.
Quote:
K-13int(K/13(2>abs(5-abs(5-abs(K-83


I even have the feeling there's more optimization to be done there, but there's places I have to go at the moment so I leave that to you guys until I come back.


Last edited by Guest on 31 Aug 2007 04:02:24 pm; edited 1 time in total
Back to top
calc84maniac


Elite


Joined: 22 Jan 2007
Posts: 770

Posted: 31 Aug 2007 04:48:39 pm    Post subject:

I got mine down to 35 bytes:
Quote:
K-13int(K/13(abs(K-83)<12 and int(3fPart(.2K
Back to top
TheStorm


Calc Guru


Joined: 17 Apr 2007
Posts: 1233

Posted: 31 Aug 2007 05:02:32 pm    Post subject:

I was wrong so I removed this post.

Last edited by Guest on 31 Aug 2007 05:50:34 pm; edited 1 time in total
Back to top
calc84maniac


Elite


Joined: 22 Jan 2007
Posts: 770

Posted: 31 Aug 2007 05:26:01 pm    Post subject:

Hate to burst your bubble, but...
1) That doesn't work. (Try with K=81)
2) It's 36 bytes.
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 31 Aug 2007 09:00:54 pm    Post subject:

I started off with what magicdanw had:

[font="courier new;font-size:9pt;line-height:100%;color:darkblue"]K-65(K>71 and K<75)-78(K>81 and K<85)-91(K>91 and K<95


And then I optimized:

[font="courier new;font-size:9pt;line-height:100%;color:darkblue"]K-65(2>abs(K-73))-78(2>abs(K-83))-91(2>abs(K-93

min(K-{65,78,91}(2>abs(K-{93,83,73

min(K-13{5,6,7}(2>abs(K-{93,83,73

{5,6,7
min(K-Ans13(2>abs(K-10Ans-23

DarkerLine's one-liner is even better in that we don't need to store to [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]K prior to the line.

So now we have:

[font="courier new;font-size:9pt;line-height:100%;color:darkblue"]Repeat Ans
getKey
End
Ans-13int(Ans/13(2>abs(5-abs(5-abs(Ans-83

I'll try to go further with this. Smile

Last edited by Guest on 31 Aug 2007 09:12:20 pm; edited 1 time in total
Back to top
luby
I want to go back to Philmont!!


Calc Guru


Joined: 23 Apr 2006
Posts: 1477

Posted: 01 Sep 2007 04:55:58 pm    Post subject:

Mine is 35 bytes (not counting the two newlines)
Quote:
K-78+20(K<80)-20(K>90
Ans+7(Ans<4)-7(Ans>6


I was so excited that I had beat the challenge, then I saw that it was 34 bytes.
Sad


Last edited by Guest on 01 Sep 2007 04:56:30 pm; edited 1 time in total
Back to top
magicdanw
pcGuru()


Calc Guru


Joined: 14 Feb 2007
Posts: 1110

Posted: 01 Sep 2007 07:09:37 pm    Post subject:

Well, you don't need a second newline, but by the standard being used here (taking the number you get in memory menu and subtracting the length of the file name) yours is 45 bytes. Sad

Also, it doesn't seem to work with numbers that don't correspond to 1-9. Sad
Back to top
TheStorm


Calc Guru


Joined: 17 Apr 2007
Posts: 1233

Posted: 04 Sep 2007 08:17:39 am    Post subject:

I have got it. This works for all numbers and was found at 10:30 pm Saturday night but I wasn't near a comp until today.
Quote:
K-13int(.08K(2=int(.03K) and int(3fPart(.2K

It is 34 bytes when you subtract the name so ha I win yayz


Edit: Darn looking back through the thread someone already beat me darn. Too bad I wasn't near a comp Saturday night.


Last edited by Guest on 04 Sep 2007 08:23:24 am; edited 1 time in total
Back to top
blast


Advanced Newbie


Joined: 24 Oct 2007
Posts: 55

Posted: 03 Nov 2007 01:05:50 am    Post subject:

Quote:
:Repeat A
:getKey→A
:End
:72686779787789→X
:888797→Y
:For(V,3,9
:X*.01→X
:100*fPart X→B
:int X→X
:If A-5=B
:V→A
:End
:For(V,0,2
:Y*.01→Y
:100*fPart Y→B
:int Y→Y
:If A-5=B
:V→A
:End
:A


Dunno know the "correct" or "standard" way to measure the size
When I try to delete this it says "133"
This includes everythign including a loop, I saw many posted soutions that all of you found, but I did not see any code to loop and actually obtain the getKey which will most def. increase your size, you solely posted the calculation...
Well I didn't measure just that.. but you can subtract 30 or something...

This is a solution for ti 82 :)

*edit, I like A better than K (blast)


Last edited by Guest on 04 Nov 2007 08:39:45 pm; edited 1 time in total
Back to top
simplethinker
snjwffl


Active Member


Joined: 25 Jul 2006
Posts: 700

Posted: 04 Nov 2007 07:21:27 pm    Post subject:

Why isn't this thread at the top of this page? It has the most recent post in this sub-forum but it's still a few down. Is this sub-forum set up to be ordered by the date each thread was started?
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 04 Nov 2007 07:37:33 pm    Post subject:

It depends on your settings:



You can find this when viewing the subforum.

[EDIT] – Uh oh, the options don't stick. Cool


Last edited by Guest on 04 Nov 2007 07:51:02 pm; edited 1 time in total
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page Previous  1, 2, 3  Next
» View previous topic :: View next topic  
Page 2 of 3 » All times are UTC - 5 Hours

 

Advertisement