Create table that will get the highest value

Please observe column A below.
This contains unique ID numbers starting from 1 and followed by unique numbers too.
It is already sorted in ascending form.
Column B has the values for the occurrence of the ID numbers in the first column.
I want to make a table that will get the largest value for each unique ID numbers.
How can I do it?
Current Table: Desired Table:
Column Column
A B A B
1 0.5 4 0.5
2 0.3 5 0.5
3 0.5 6 0.4
2 0.4 7 0.2
3 0.4
3 0.2
4 0.2
