package main import ( "fmt" ) func main() { solve() } func solve(){ var N, K int fmt.Scan(&N, &K) pre := win(N, K) y := 0 if pre == false{ fmt.Println("0") }else{ if K < N - 1 { fmt.Println(K) y = K }else{ fmt.Println(N-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 }