#20210: 求問 送出解答後 卡在側資點02 那一大串數字


z85385637 (M-Kai)


import java.util.Scanner;

public class c971 {

public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc= new Scanner(System.in);
int a1 = sc.nextInt();
int an = sc.nextInt();
int r = sc.nextInt();
int round = Math.abs((a1+an)/r); //算項數
if(a1==an) {
System.out.print(a1);
}else {
for(int i=0 ; i<=round ; i++) {
System.out.print((a1+i*r)+" ");

}
}

}

}