#991. 小杨报数

小杨报数

(加个改进版)

说明

小杨需要从 <math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>1</mn></mrow></semantics></math>1 到 <math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>�</mi></mrow></semantics></math>N 报数。在报数过程中,小杨希望跳过 <math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>�</mi></mrow></semantics></math>M 的倍数。例如,如果 <math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>�</mi><mo>=</mo><mn>5</mn></mrow></semantics></math>N=5, <math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>�</mi><mo>=</mo><mn>2</mn></mrow></semantics></math>M=2 ,那么小杨就需要依次报出 <math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>1</mn></mrow></semantics></math>1<math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>3</mn></mrow></semantics></math>3<math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>5</mn></mrow></semantics></math>5

现在,请你依次输出小杨报的数。

输入格式

输入 <math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>2</mn></mrow></semantics></math>2 行,第一行一个整数 <math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>�</mi><mtext>(</mtext><mn>1</mn><mo>≤</mo><mi>�</mi><mo>≤</mo><mn>1</mn><mo separator="true">,</mo><mn>000</mn><mtext>)</mtext></mrow></semantics></math>N1N1,000;第二行一个整数 <math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>�</mi><mtext>(</mtext><mn>2</mn><mo>≤</mo><mi>�</mi><mo>≤</mo><mn>100</mn><mtext>)</mtext></mrow></semantics></math>M2M100

输出格式

输出若干行,依次表示小杨报的数。

样例

5
2
1
3
5

相关

在下列比赛中:

集训小测-20240806

在以下作业中:

语法-20240724