7 kyu

Format data value

Description:

You get input data as a number (of megabytes). Your task is to convert it to the string adding 'MB' or 'GB' or 'TB' correctly.

Find the details below:

900 -> '900MB'
1900 -> '1GB 900MB'
568200 -> '568GB 200MB'
1000000 -> '1TB'
1234567 -> '1TB 234GB 567MB'

P.S. 0 <= input number < 1000000000

Fundamentals
Arrays

Stats:

CreatedDec 14, 2017
PublishedDec 14, 2017
Warriors Trained467
Total Skips2
Total Code Submissions1149
Total Times Completed225
JavaScript Completions225
Total Stars14
% of votes with a positive feedback rating84% of 80
Total "Very Satisfied" Votes59
Total "Somewhat Satisfied" Votes16
Total "Not Satisfied" Votes5
Total Rank Assessments6
Average Assessed Rank
7 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • Dmitry Kudla Avatar
  • Almusawi Avatar
Ad