Post Reply 
HHC 2019 will be in Reno, Nevada, Sept 21-22
09-30-2019, 03:15 AM (This post was last modified: 09-30-2019 03:16 AM by Craig Bladow.)
Post: #57
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22
(09-28-2019 04:45 PM)David Hayden Wrote:  I think this can be used to time the program:
LBL 01
TIME
STO 24
XEQ "CUBES" ; or whatever program you're timing
TIME
RCL 24
HMS-
END

On my DM42, my program takes 1.02s. On a 41C w/ quad memory module, 5 minutes, 7 seconds.

I used Dave's timing program to time my entry to the programming contest at HHC 2019.

It runs in 1.4 seconds on a DM42 running on battery.

The program reduces the search space to 8*8*8 by not evaluating some combinations that would sum to greater than 999.

Code:

00 { 134-Byte Prgm }
01▸LBL "cbsum"
02 9ᴇ-3
03▸LBL 01
04 ENTER
05 IP
06 3
07 Y↑X
08 STO IND ST Y
09 R↓
10 ISG ST X
11 GTO 01
12 1.009
13 STO 10
14 7ᴇ-3
15 STO 11
16 7ᴇ-3
17 STO 12
18 14
19 STO 13
20▸LBL 02
21 RCL IND 10
22 RCL IND 11
23 +
24 RCL IND 12
25 +
26 CF 01
27 RCL 10
28 IP
29 100
30 ×
31 RCL 11
32 IP
33 10
34 ×
35 +
36 RCL 12
37 IP
38 +
39 X≠Y?
40 GTO 05
41 STO IND 13
42 1
43 STO+ 13
44▸LBL 05
45 ISG 12
46 GTO 02
47 7ᴇ-3
48 STO 12
49 ISG 11
50 GTO 02
51 7ᴇ-3
52 STO 11
53 ISG 10
54 GTO 02
55 14
56 RCL 13
57 1
58 -
59 1ᴇ3
60 ÷
61 +
62 STO 13
63▸LBL 03
64 RCL IND 13
65 ISG 13
66 GTO 03
67 STOP
68 END

Try CC41!
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HHC 2019 will be in Reno, Nevada, Sept 21-22 - Craig Bladow - 09-30-2019 03:15 AM



User(s) browsing this thread: 1 Guest(s)