Post Reply 
CASIO Graph 90+E
09-03-2018, 02:06 PM
Post: #49
RE: CASIO Graph 90+E
(09-01-2018 10:40 AM)xerxes Wrote:  
(08-30-2018 03:54 PM)Dave Britten Wrote:  EDIT: It can run the standard 8x8 n-queens benchmark (http://www.hpmuseum.org/cgi-sys/cgiwrap/...i?read=700) in a bit under one second. (I just did a quick port of the generic Pascal version on that page.)

Would be nice to have your test result and the code in the list, if you are also interested.
If yes, can you please check the execution time with an outer loop of 100 iterations for a
more accurate result?

100 runs took a total of about 29 seconds. The code is listed below; should work for just about anything that runs Python.

Code:
for i in range(100):
  a = [0] * 9
  r = 8
  s = 0
  x = 0
  y = 0
  t = 0
  while True:
    x += 1
    a[x] = r
    while True:
      s += 1
      y = x
      while y>1:
        y -= 1
        t = a[x]-a[y]
        if t==0 or x-y==abs(t):
          y=0
          a[x] -= 1
          while a[x]==0:
            x -= 1
            a[x] -= 1
      if y==1:
        break;
    if x==r:
      break;
  print(s)
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
CASIO Graph 90+E - Gerald H - 05-08-2018, 01:48 PM
RE: CASIO Graph 90+E - toml_12953 - 05-08-2018, 02:45 PM
RE: CASIO Graph 90+E - Helix - 05-09-2018, 12:17 AM
RE: CASIO Graph 90+E - toml_12953 - 05-09-2018, 03:28 AM
RE: CASIO Graph 90+E - Helix - 05-10-2018, 12:01 AM
RE: CASIO Graph 90+E - toml_12953 - 05-10-2018, 01:46 AM
RE: CASIO Graph 90+E - jebem - 05-10-2018, 09:39 AM
RE: CASIO Graph 90+E - StephenG1CMZ - 07-14-2020, 02:29 PM
RE: CASIO Graph 90+E - toml_12953 - 07-14-2020, 04:08 PM
RE: CASIO Graph 90+E - ijabbott - 07-14-2020, 09:09 PM
RE: CASIO Graph 90+E - tcab - 05-09-2018, 01:40 AM
RE: CASIO Graph 90+E - klesl - 05-09-2018, 02:17 PM
RE: CASIO Graph 90+E - Eddie W. Shore - 05-10-2018, 01:52 PM
RE: CASIO Graph 90+E - toml_12953 - 05-10-2018, 02:55 PM
RE: CASIO Graph 90+E - John Keith - 05-11-2018, 07:02 PM
RE: CASIO Graph 90+E - severedgarden - 05-10-2018, 10:05 PM
RE: CASIO Graph 90+E - toml_12953 - 05-11-2018, 04:11 PM
RE: CASIO Graph 90+E - severedgarden - 05-11-2018, 07:04 PM
RE: CASIO Graph 90+E - ijabbott - 05-12-2018, 07:17 PM
RE: CASIO Graph 90+E - toml_12953 - 05-12-2018, 08:39 PM
RE: CASIO Graph 90+E - Gerald H - 05-16-2018, 06:31 PM
RE: CASIO Graph 90+E - severedgarden - 05-21-2018, 10:46 AM
RE: CASIO Graph 90+E - ijabbott - 05-27-2018, 08:51 PM
RE: CASIO Graph 90+E - pier4r - 05-27-2018, 09:33 PM
RE: CASIO Graph 90+E - severedgarden - 05-27-2018, 09:42 PM
RE: CASIO Graph 90+E - ijabbott - 05-27-2018, 11:24 PM
RE: CASIO Graph 90+E - tcab - 05-27-2018, 10:05 PM
RE: CASIO Graph 90+E - Helix - 05-27-2018, 10:54 PM
RE: CASIO Graph 90+E - ijabbott - 07-03-2018, 10:01 PM
RE: CASIO Graph 90+E - severedgarden - 07-04-2018, 07:11 PM
RE: CASIO Graph 90+E - ijabbott - 07-04-2018, 09:42 PM
RE: CASIO Graph 90+E - ijabbott - 07-20-2018, 05:30 PM
RE: CASIO Graph 90+E - klesl - 07-21-2018, 08:16 AM
RE: CASIO Graph 90+E - compsystems - 07-21-2018, 04:57 PM
RE: CASIO Graph 90+E - StephenG1CMZ - 08-11-2018, 02:08 PM
RE: CASIO Graph 90+E - Chasfield - 08-11-2018, 04:05 PM
RE: CASIO Graph 90+E - StephenG1CMZ - 08-11-2018, 05:08 PM
RE: CASIO Graph 90+E - ijabbott - 08-11-2018, 09:42 PM
RE: CASIO Graph 90+E - StephenG1CMZ - 08-11-2018, 10:44 PM
RE: CASIO Graph 90+E - m@x - 08-23-2018, 08:47 AM
RE: CASIO Graph 90+E - rprosperi - 08-23-2018, 12:31 PM
RE: CASIO Graph 90+E - Dave Britten - 08-23-2018, 12:44 PM
RE: CASIO Graph 90+E - toml_12953 - 08-23-2018, 05:28 PM
RE: CASIO Graph 90+E - Dave Britten - 08-11-2018, 05:20 PM
RE: CASIO Graph 90+E - severedgarden - 08-30-2018, 02:39 PM
RE: CASIO Graph 90+E - rprosperi - 08-30-2018, 03:53 PM
RE: CASIO Graph 90+E - Dave Britten - 08-30-2018, 03:54 PM
RE: CASIO Graph 90+E - xerxes - 09-01-2018, 10:40 AM
RE: CASIO Graph 90+E - Dave Britten - 09-03-2018 02:06 PM
RE: CASIO Graph 90+E - brickviking - 09-06-2018, 10:35 AM
RE: CASIO Graph 90+E - klesl - 08-30-2018, 06:15 PM
RE: CASIO Graph 90+E - StephenG1CMZ - 08-30-2018, 09:51 PM
RE: CASIO Graph 90+E - Dave Britten - 08-30-2018, 09:57 PM
RE: CASIO Graph 90+E - gomefun2 - 09-03-2018, 05:52 PM
RE: CASIO Graph 90+E - Dave Britten - 09-03-2018, 06:43 PM
RE: CASIO Graph 90+E - Thomas Klemm - 09-03-2018, 08:14 PM
RE: CASIO Graph 90+E - xerxes - 09-04-2018, 11:08 AM
RE: CASIO Graph 90+E - xerxes - 09-04-2018, 11:50 AM
RE: CASIO Graph 90+E - Dave Britten - 09-04-2018, 12:52 PM
RE: CASIO Graph 90+E - xerxes - 09-04-2018, 01:00 PM
RE: CASIO Graph 90+E - gomefun2 - 09-04-2018, 01:59 PM
RE: CASIO Graph 90+E - Dave Britten - 09-05-2018, 11:32 AM
RE: CASIO Graph 90+E - xerxes - 09-06-2018, 11:53 AM
RE: CASIO Graph 90+E - brickviking - 09-07-2018, 04:38 AM
RE: CASIO Graph 90+E - xerxes - 09-07-2018, 10:22 AM
RE: CASIO Graph 90+E - pier4r - 09-07-2018, 03:46 PM
RE: CASIO Graph 90+E - severedgarden - 09-07-2018, 04:00 PM
RE: CASIO Graph 90+E - ijabbott - 09-07-2018, 04:58 PM
RE: CASIO Graph 90+E - StephenG1CMZ - 07-14-2020, 10:01 PM
RE: CASIO Graph 90+E - ijabbott - 07-15-2020, 05:51 PM
RE: CASIO Graph 90+E - StephenG1CMZ - 07-15-2020, 08:55 PM



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