package main import ( "fmt" ) func main() { solve() } func solve(){ var N, K int fmt.Scan(&N, &K) pre := win(N, K) //fmt.Println(pre) y := 0 if pre == false{ fmt.Println("0") }else{ fmt.Println("1") y = 1 } x := 0 for{ fmt.Scan(&x) if x>=N{ break } fmt.Println(y+K+1) y = y + K + 1 } return } func win(n, k int)bool{ for n > 1{ n = n - (k + 1) } if n == 1{ return false } return true }