#47Medium
Splitting a segment into equal parts
Time: 1 s · Memory: 256 MB
- Loops
Statement
A segment is given on the number line. It is split into equal parts. Find the length of a part and the division points: — points in total.
Input format
A single line with three integers , , (, ).
Output format
The first line contains . The second line contains the points from left to right. All numbers with exactly 2 digits after the decimal point.
Examples
Input
1 3 5
Output
0.40 1.00 1.40 1.80 2.20 2.60 3.00
Input
0 10 4
Output
2.50 0.00 2.50 5.00 7.50 10.00
Note
and the -th point is . It is better to compute each point with : with x += h the small floating-point errors pile up on every step.
