package main import ( "bufio" "fmt" "os" "strconv" ) // 参考: http://qiita.com/tnoda_/items/b503a72eac82862d30c6 // Max 64k var sc = bufio.NewScanner(os.Stdin) func nextLine() string { // sc.Split(bufio.ScanLines) // split \n sc.Scan() return sc.Text() } func nextInt() int { // sc.Split(bufio.ScanWords) // split SP sc.Scan() i, e := strconv.Atoi(sc.Text()) if e != nil { panic(e) } return i } func nextFloat() float64 { // sc.Split(bufio.ScanWords) // split SP sc.Scan() i, e := strconv.ParseFloat(sc.Text(), 64) if e != nil { panic(e) } return i } // Over 64k var rdr = bufio.NewReaderSize(os.Stdin, 1000000) func readLine() []byte { buf := make([]byte, 0, 1000000) for { l, p, e := rdr.ReadLine() if e != nil { panic(e) } buf = append(buf, l...) if !p { break } } return buf } func main() { sc.Split(bufio.ScanWords) v1, v2, d, w := nextFloat(), nextFloat(), nextFloat(), nextFloat() t := d / (v1 + v2) fmt.Println(w * t) }