From 195f46d26fe3889e9e01185dc9f434b884540c26 Mon Sep 17 00:00:00 2001 From: itsubaki <1759459+itsubaki@users.noreply.github.com> Date: Wed, 5 Jun 2024 13:16:14 +0000 Subject: [PATCH] Update cmd/shor --- cmd/shor/main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/shor/main.go b/cmd/shor/main.go index ee6d2ed..c1a501f 100644 --- a/cmd/shor/main.go +++ b/cmd/shor/main.go @@ -26,11 +26,6 @@ func main() { return } - if number.IsPrime(N) { - fmt.Printf("N=%d is prime.\n", N) - return - } - if number.IsEven(N) { fmt.Printf("N=%d is even. p=%d, q=%d.\n", N, 2, N/2) return @@ -41,6 +36,11 @@ func main() { return } + if number.IsPrime(N) { + fmt.Printf("N=%d is prime.\n", N) + return + } + if a < 0 { a = rand.Coprime(N) }