For problem statement at 1000-1999/1200-1299/1270-1279/1278/problemB.txt this is a correct solution, but verifier at 1000-1999/1200-1299/1270-1279/1278/verifierB.go ends with All tests passed can you fix the verifier? package main
import (
"fmt"
"math"
)
func main() {
var t int
fmt.Scan(&t)
for i := 0; i < t; i++ {
var a, b int64
fmt.Scan(&a, &b)
d := a - b
if d < 0 {
d = -d
}
k := int64(math.Sqrt(float64(d * 2)))
for k*(k+1)/2 < d {
k++
}
for (k*(k+1)/2-d)%2 != 0 {
k++
}
fmt.Println(k)
}
}