package main

import "fmt"

func S(A int, B int) float64 {
    C := [4]float64{1.0, 0.0, 0.0, 0.0}
    for i := 0; i < B; i++ {
        C[3] = 0
        for ; ; {
            C[1] = C[2]
            C[2] += C[0]
            C[3] = C[2] * C[2]
            if C[3] > float64(A) {
                break
            }
        }
        C[2] = C[1]
        C[0] = C[0]*0.1
    }
    return C[2]
}

func main() {
    fmt.Println(S(2,10))
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: