Advertisement
Spocoman

Mining Rig

Oct 10th, 2024
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.49 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4.   "fmt"
  5.   "math"
  6. )
  7.  
  8. func main() {
  9.     var videosPrice, cablesPrice int
  10.     fmt.Scanln(&videosPrice)
  11.     fmt.Scanln(&cablesPrice)
  12.    
  13.     var powerPerDay, profitPerDay float64
  14.     fmt.Scanln(&powerPerDay)
  15.     fmt.Scanln(&profitPerDay)
  16.    
  17.     computerPrice := (videosPrice + cablesPrice) * 13 + 1000
  18.  
  19.     cashbackDays := math.Ceil(float64(computerPrice) / ((profitPerDay - powerPerDay) * 13))
  20.  
  21.     fmt.Printf("%d\n%d\n", computerPrice, int(cashbackDays))
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement