Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "bufio"
- "fmt"
- "os"
- "strconv"
- )
- func main() {
- scanner := bufio.NewScanner(os.Stdin)
- scanner.Scan()
- series := scanner.Text()
- scanner.Scan()
- season,_ := strconv.Atoi(scanner.Text())
- scanner.Scan()
- volume,_ := strconv.Atoi(scanner.Text())
- scanner.Scan()
- time,_ := strconv.ParseFloat(scanner.Text(), 64)
- minutes := float64(season * volume) * time * 1.2 + float64(season) * 10
- fmt.Printf("Total time needed to watch the %s series is %d minutes.", series, int(minutes))
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement