From 5b4740e769ba3677ffcc0aa077920f30387f556c Mon Sep 17 00:00:00 2001 From: RomaSub Date: Fri, 8 Sep 2023 20:11:48 +0300 Subject: [PATCH 1/2] fix supremum syracuse tests --- src/battle_asserts/issues/supremum_syracuse.clj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/battle_asserts/issues/supremum_syracuse.clj b/src/battle_asserts/issues/supremum_syracuse.clj index 3a5a26f2..38abf126 100644 --- a/src/battle_asserts/issues/supremum_syracuse.clj +++ b/src/battle_asserts/issues/supremum_syracuse.clj @@ -17,11 +17,11 @@ (gen/tuple (gen/choose 1 100))) (def test-data - [{:expected 8 + [{:expected 16 :arguments [6]} - {:expected 26 + {:expected 52 :arguments [11]} - {:expected 4616 + {:expected 9232 :arguments [27]}]) (defn solution [num] @@ -31,6 +31,6 @@ [num] (concat [num] (if (odd? num) - (gen-seq (quot (inc (* 3 num)) 2)) + (gen-seq (+ (* 3 num) 1)) (gen-seq (quot num 2))))))] (apply max (gen-seq num)))) From 0b48c38ee5f9b6a0a389864342b34d73e09f3b24 Mon Sep 17 00:00:00 2001 From: RomaSub Date: Sun, 10 Sep 2023 15:45:56 +0300 Subject: [PATCH 2/2] fix supremum_syracuse --- src/battle_asserts/issues/supremum_syracuse.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle_asserts/issues/supremum_syracuse.clj b/src/battle_asserts/issues/supremum_syracuse.clj index 38abf126..820440fd 100644 --- a/src/battle_asserts/issues/supremum_syracuse.clj +++ b/src/battle_asserts/issues/supremum_syracuse.clj @@ -31,6 +31,6 @@ [num] (concat [num] (if (odd? num) - (gen-seq (+ (* 3 num) 1)) + (gen-seq (inc (* 3 num))) (gen-seq (quot num 2))))))] (apply max (gen-seq num))))