mirror of
https://github.com/onyx-and-iris/aoc2024.git
synced 2026-04-08 18:13:36 +00:00
add result struct to package one
remove unnecessary assignments in util.splitNumber
This commit is contained in:
@@ -44,10 +44,7 @@ func mustConv(s string) int {
|
||||
func splitNumber(n int) (int, int) {
|
||||
factor := int(math.Pow10(lenItoa(n) / 2))
|
||||
|
||||
left := int(n / factor)
|
||||
right := n % factor
|
||||
|
||||
return left, right
|
||||
return int(n / factor), n % factor
|
||||
}
|
||||
|
||||
func lenItoa(n int) int {
|
||||
|
||||
Reference in New Issue
Block a user