Skip to content

Instantly share code, notes, and snippets.

View osagolang's full-sized avatar

Сергей osagolang

View GitHub Profile
@osagolang
osagolang / gist:58b62b05f59a63faf4828ba5b2da42bc
Created September 12, 2025 13:45
Task 3: Console Utility — Find Prime Numbers in Ranges
package main
import (
"bufio"
"context"
"errors"
"flag"
"fmt"
"os"
"strconv"
@osagolang
osagolang / gist:583c323708dbdfda1fe695e4b089cf54
Created September 12, 2025 13:33
Task 2: Write Tests for getScore
package main
import (
"testing"
)
func makeStamps(offsets []int, homes []int, aways []int) []ScoreStamp {
if len(offsets) != len(homes) || len(homes) != len(aways) {
panic("invalid test fixture: lengths mismatch")
}
@osagolang
osagolang / gist:12eda26972845c5ee111f3b197b4d7e3
Created September 12, 2025 13:29
Task 1: Implement a getScore Function
package main
import (
"fmt"
"math"
"math/rand"
"time"
)
const TIMESTAMPS_COUNT = 50000