mirror of
https://github.com/cubixle/codekata-golang.git
synced 2026-04-24 21:24:46 +01:00
20201130: fix data
This commit is contained in:
@@ -1,13 +1,18 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import "fmt"
|
import (
|
||||||
|
"fmt"
|
||||||
|
"sort"
|
||||||
|
)
|
||||||
|
|
||||||
var prices = []int{6, 8, 12, 14, 18, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44}
|
var prices = []int{6, 8, 12, 14, 18, 22, 24, 26, 28, 32}
|
||||||
var pricesWithAll = []int{6, 8, 12, 12, 12, 12, 12, 14, 14, 18, 22, 22, 22, 24, 24, 26, 26, 26, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44}
|
var pricesWithAll = []int{6, 8, 12, 12, 12, 12, 12, 14, 14,
|
||||||
|
18, 22, 22, 22, 24, 24, 26, 26, 26, 26, 28, 32, 30, 30, 30, 34, 36, 38, 38, 38, 38, 40, 44}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
fmt.Println(sumCoins(50, prices))
|
fmt.Println(sumCoins(50, prices))
|
||||||
fmt.Println(sumCoins(100, prices))
|
fmt.Println(sumCoins(100, prices))
|
||||||
|
sort.Ints(pricesWithAll)
|
||||||
fmt.Println("paid = 50", sumCoins(50, pricesWithAll))
|
fmt.Println("paid = 50", sumCoins(50, pricesWithAll))
|
||||||
fmt.Println("paid = 100", sumCoins(100, pricesWithAll))
|
fmt.Println("paid = 100", sumCoins(100, pricesWithAll))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user