use strict; use warnings; $| = 1; my($n, $k) = split ' ', <>; my $ans = ($n-1) % ($k+1); print $ans."\n"; while(<> < $n){ $ans += $k+1; print $ans."\n"; }