If you're like me (and/or use Windows), You should have found this issue quite disturbing.
You plug in a hard drive (2TB for my occasion), and realize it doesn't show as 2TB, but a bit smaller size which is clearly not 2TB.
Over some research, I found it was because of Microsoft's mistake. Mistyping Binary prefix as Decimal prefixes. (i.e. They typed 1TiB as 1TB)
So, I would like to see a Binary prefix to Decimal prefix program. Since this is a big problem (and some computers are literally toasters), You have to make your program as short as possible.
You will be given the size (positive real number, will not exceed 2ˆ16 when converted), and the unit (4 of them, KiB, MiB, GiB and TiB, each corresponds to 1024ˆ1, 1024ˆ2, 1024ˆ3 and 1024ˆ4 bytes)
You have to output the (decimal representation of) the size (rounded half-up to integer value), and the corresponding unit.
678 MiB => 711 MB 1.8 TiB => 2 TB
Tip: Google has a unit converter