← Home
For problem statement at 0-999/900-999/930-939/933/problemB.txt this is a correct solution, but verifier at 0-999/900-999/930-939/933/verifierB.go ends with edge case 1 failed: expected length 1 got 0
exit status 1 can you fix the verifier? ```go
package main

import (
	"fmt"
)

func main() {
	var p, k int64
	if _, err := fmt.Scan(&p, &k); err != nil {
		return
	}

	var coeffs []int64
	for p != 0 {
		rem := p % k
		if rem < 0 {
			rem += k
		}
		coeffs = append(coeffs, rem)
		p = (p - rem) / (-k)
	}

	fmt.Println(len(coeffs))
	for i, c := range coeffs {
		if i > 0 {
			fmt.Print(" ")
		}
		fmt.Print(c)
	}
	fmt.Println()
}
```