From f2d4bc6b7c302dee2d84a3acf84b83b5a98c45fa Mon Sep 17 00:00:00 2001 From: Raphael McSinyx Date: Mon, 20 Feb 2017 10:33:39 +0700 Subject: More parentheses --- THT/B/QG-2016/remainder.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'THT/B/QG-2016') diff --git a/THT/B/QG-2016/remainder.scm b/THT/B/QG-2016/remainder.scm index 3df8468..8360da1 100644 --- a/THT/B/QG-2016/remainder.scm +++ b/THT/B/QG-2016/remainder.scm @@ -3,8 +3,7 @@ (cond ((= y 1) (remainder x z)) ((= (remainder y 2) 0) (remainder (sqr (pow x (quotient y 2) z)) z)) (else (remainder (* (sqr (pow x (quotient y 2) z)) x) z)))) -(with-output-to-file "REMAINDER.TXT" (lambda () - (for-each +(with-output-to-file "REMAINDER.TXT" (lambda () (for-each (lambda (l) (let* ((a (integer-expt 10 (string-length (number->string (list-ref l 0))))) (m (* (list-ref l 2) (- a 1))) -- cgit 1.4.1