Hi, Jozef Chraplewski <jo...@applicake.com> skribis:
> The solution is trivial: > > (define (problem-48 limit) > (define (F) > (let loop ((n 1) > (sum 0)) > (if (<= n limit) > (loop (+ n 1) (+ sum (expt n n))) > sum))) > > (let* ((str (number->string (F))) > (len (string-length str))) > (substring str (- len 10) len))) > > (display (problem-48 1000)) > (newline) > > > The proper answer is 9110846700 but guile returns 6457854188 I also get 9110846700 with 2.0.6+ and 1.8.8+. What version do you use? (Bigloo 3.2a returns 5842605292, though.) Ludo’.