package main import ( "fmt" "math" ) func main() { var A, B int _, _ = fmt.Scan(&A, &B) if A == 0 || B == 0 { fmt.Println(1) return } a, b := 1, 1 for { ta := int(math.Round(float64(a*100) / float64(a+b))) tb := int(math.Round(float64(b*100) / float64(a+b))) // fmt.Println(a, ta, b, tb) if A == ta && B == tb { fmt.Println(a + b) return } else { if A > ta { a++ } else { b++ } } } }