← Home
For problem statement at 1000-1999/1000-1099/1070-1079/1076/problemC.txt this is a correct solution, but verifier at 1000-1999/1000-1099/1070-1079/1076/verifierC.go ends with case 1 failed: expected:
Y 984.998983738787842 1.001016261212158
Y 426.997652569224329 1.002347430775671

got:
Y 984.9989837388 1.0010162612
Y 426.9976525692 1.0023474308
input:
2
986
428
exit status 1 can you fix the verifier? ```go
package main

import (
	"fmt"
	"math"
)

func main() {
	var t int
	fmt.Scan(&t)

	for i := 0; i < t; i++ {
		var d int
		fmt.Scan(&d)

		if d == 0 || d >= 4 {
			dFloat := float64(d)
			delta := math.Sqrt(dFloat*dFloat - 4.0*dFloat)
			a := (dFloat + delta) / 2.0
			b := (dFloat - delta) / 2.0
			fmt.Printf("Y %.10f %.10f\n", a, b)
		} else {
			fmt.Println("N")
		}
	}
}
```