package main import ( "bufio" "fmt" "math" "os" "strconv" ) func main() { a := readFloat64() b := readFloat64() c := readFloat64() if a == 0 { fmt.Println("1") fmt.Println(-c / b) } else { d := b*b - 4*a*c if d > 0 { fmt.Println("2") fmt.Println((-b - math.Sqrt(d)) / (2 * a)) fmt.Println((-b + math.Sqrt(d)) / (2 * a)) } else if d == 0 { fmt.Println("1") fmt.Println(-b / (2 * a)) } else { fmt.Println("0") } } } var stdin *bufio.Scanner func read() string { if stdin == nil { stdin = bufio.NewScanner(os.Stdin) stdin.Split(bufio.ScanWords) stdin.Buffer(make([]byte, bufio.MaxScanTokenSize), int(math.MaxInt32)) } stdin.Scan() return stdin.Text() } func readInt() int { n, _ := strconv.Atoi(read()) return n } func readFloat64() float64 { n, _ := strconv.ParseFloat(read(), 64) return n }