From 6c5fb0e2f40af865a92c6489c47cd1031b1822d3 Mon Sep 17 00:00:00 2001 From: "exercism-solutions-syncer[bot]" <211797793+exercism-solutions-syncer[bot]@users.noreply.github.com> Date: Sun, 17 May 2026 21:53:29 +0000 Subject: [PATCH] [Sync Iteration] go/darts/1 --- solutions/go/darts/1/darts.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 solutions/go/darts/1/darts.go diff --git a/solutions/go/darts/1/darts.go b/solutions/go/darts/1/darts.go new file mode 100644 index 0000000..fa94adb --- /dev/null +++ b/solutions/go/darts/1/darts.go @@ -0,0 +1,17 @@ +package darts +import "math" + +func Score(x, y float64) int { + z:= math.Sqrt(x*x + y*y) + + if z > 10 { + return 0 + } + if z > 5 { + return 1 + } + if z > 1 { + return 5 + } + return 10 +}