LearnPy Hub
← Data Types & Casting problems
Hard

Human-Readable File Size

Read a size in bytes and print it in the largest unit (B, KB, MB, GB, TB, with 1024 per step) where the value is at least 1, with one decimal place, like 1.5 KB.

Input

One integer.

Output

One line.

Sample 1

Input
1536
Output
1.5 KB

Sample 2

Input
500
Output
500.0 B
solution.py
Output appears here
Human-Readable File Size · Python practice problem · LearnPy Hub