{"group":{"id":1,"name":"Community","lockable":false,"created_at":"2012-01-18T18:02:15.000Z","updated_at":"2025-12-14T01:33:56.000Z","description":"Problems submitted by members of the MATLAB Central community.","is_default":true,"created_by":161519,"badge_id":null,"featured":false,"trending":false,"solution_count_in_trending_period":0,"trending_last_calculated":"2025-12-14T00:00:00.000Z","image_id":null,"published":true,"community_created":false,"status_id":2,"is_default_group_for_player":false,"deleted_by":null,"deleted_at":null,"restored_by":null,"restored_at":null,"description_opc":null,"description_html":null,"published_at":null},"problems":[{"id":46913,"title":"How many bytes an image requires from RAM?","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none solid rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 406.4px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 203.2px; transform-origin: 407px 203.2px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 62.4px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 31.2px; text-align: left; transform-origin: 384px 31.2px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eSeveral algorithms store compressed images at our computers; types such as FIG, JPG, or PNG help software to identify them. On the other hand, whenever we visualize an image on a display screen, it must be decompressed to its total size: displaying a compressed image is utterly incomprehensible to humans. Your task is to compute this total size.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 62.4px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 31.2px; text-align: left; transform-origin: 384px 31.2px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eAn image total size in bits is calculated with the following formula: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKMAAAAjCAYAAAD43LpYAAAHmElEQVR4Xu2aB6h1xRWFPwuKvXexYEOxIBbEEkVjNIol9l6wo7GXRBM1xSSoUewtISR27IqINbEr9hoLYsVeY0tCLHxhz8+8+2455753eOfBDIjvv/ecuXv2rL332mtmKsooHmiJB6ZqiR3FjOIBChgLCFrjgQLG1mxFMaSAsWCgNR4oYGzNVhRDChgnHwZmAKYBvph8pve3uICx/Tu6ErA+sCLg3ysDWwA3tt90pgXWBvYA1gMWBZ4A/g6cBbyWr6GAcRLsKDAT8AfgIOApYHvgxZabrs2/Bj4DrgU+BXYGjgNmAe4AdgPeSesoYGz5joZ5luXfAD8HLgYOBD5vuel7AdMB5wPfha1myl8BxxYwtnz3+pg3R4BwU+Bw4PSWL0Veq40vxf8TGDVbQC4CfBL/TVlKyYwt39UwT754NTA/8GPg/pabbSY/IcrwUcA1wLeDbC5gHOShdnwv17oE+EfwrrfbYVZfK5YF/gIsB5wLnAx83O+NAsZmdnVb4I/AEc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\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e, in which \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003ew\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e is its width, \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003eh\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e is its height, \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003eδ\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e is its pixel depth, the number of bits used to store color intensity. Usually, image dimensions are easily obtained from any software, but its pixel depth is not always available. Nevertheless, it is easy to guess the latter since:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 80px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 404px 40px; transform-origin: 404px 40px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10px; transform-origin: 404px 10px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eBlack-and-white (BW) images \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003ehave 1-bit pixel depth.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10px; transform-origin: 404px 10px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eGrayscale (L) images \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003ehave 8-bit pixel depth.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10px; transform-origin: 404px 10px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eRGB (colored) images \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003ehave 24-bit pixel depth.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10px; transform-origin: 404px 10px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eRGBA (transparency) images \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003ehas 32-bit pixel depth.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 83.2px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 10px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 10px; perspective-origin: 384px 41.6px; text-align: left; transform-origin: 384px 41.6px; white-space: pre-wrap; margin-left: 4px; margin-top: 10px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eCompute how many bytes an image requires from RAM, given its w, h, and a string informing the type of the image: BW, L, RGB, or RGBA. \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eMoreover, make the results more human-readable by showing them with units: bytes (\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAAAlCAYAAAC6TzLyAAACbUlEQVRYR+3WSchOcRQG8N8XFhIiRSlWkqzEglKysFAyZWMmY4QMGZJMC1OZYmGhyJBpg2wsFGVBKRvJio2EhSiUITr1v1/X7R3uO+jdfHf3dv/vec7z/M/znNulg09XB7H1gHdE/f8h+2BswQi8x3AcxfMiw3aDD8U5vMV2fMN87MNyPM430E7wqLUZ2zAbTxPQEFzCB2zAl6yBdoJnIL2xAB8TSC8cxLJCUzWtFkUmYykmYTQe4i6u4l3hDifiPq5jU5I8O7IEF9MsnKjHPIYmul1XxQavsBqPcu9n4na685D/e+7dQlxGAO/Ej3hXSfZgHAfm4Tge4CfGYT1mpKIxPIvwJv3OAA5hD37Xa6wS+AQcS6xfFpj3S7bJFFmJ8yXAp6UrCSd0q1IEj9+78RpXqkg+FjcxpiBjy7IPxH4cqTBQWS/9cRaLC/c7Pg3jvVYHrlbc9k2M16RGo9k/qGa1UHNvmvTp+aBpxud55rNwJ3UatTZiR8HPg3JzsQKf6lmtFvORyecRneHfvN+zeH2R2MbEz8FhrEo50V27GeZzcSH5/FqFLodhK6KRWCzRbFj2SbqepsFDwrBLRGcsjq+t7OJGmGd3OhUxbMGqpacR8ClpNUbAFMOnqSbKgkegRGzuahdwtWwvssiAY9E8a4pilT/VYz4q2eRUYYPly/VJU/yr0cZqgWcWOV30Zw4kNuBaRKTGPmjoqQYeH30ncSOt1EpFByASK4LkQGGFlmqiEniWUhGd9Z5It/z3Wr3z/7wvggebM2ljlSl0C7HTP5c5XDxTb+CaqVn6Pz3gpaVq58Ee2dupZulaHZX9L3ywhyYj6PqEAAAAAElFTkSuQmCC\" width=\"15.5\" height=\"18.5\" style=\"width: 15.5px; height: 18.5px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e), KB (\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAAlCAYAAADfosCNAAACy0lEQVRYR+3XXeiOdxzH8dc/VrQQKWrFWi1pNYkDSolysBLb2skwI495zEM2sTwd2CjbZAcOhuUhTyfIiQNFOaCUE8kRJ0vjQFMsTPSt36Wrq+u67v99u+9//fP/nd3dv4f37/P7fj/f79WlF4yuXsCoD7Jdr/ReKxmX/xw/4A9cK1F1GNZjFP7BR9iDW8W5nVDyY6zCV/gEU0ogR+Ag/sYmPMO32I6FxfmdgByA59iKnSWQceY6bMSXuJGUG46jeIjVeJIp2gnIbO+fKiAzmP6Yg0dpQT/swoICfK0FxSbxVN9jMsbgCi7gBB40yN4qyEm4hFNYm54622o+/kqx+msjJSOo41YrKkDuYimu1oBWQc7CuRST8ez/5faYi2MIwB/xIv4re+5QMCZ8g324jJcYj5WYmTaNjJ2H+xWgVZAZyG7EnFe59aUXKIOciL1JxTsFgA+TTWQKL8afbYSckUIhMv+tykXI+L0F93C84vDPcAZji89SmN+x5x6CHfilJjEGJYP+riKuGmX3hJR8F981ceoSd2BScFm6UFzqdcmCZi0oXnFbyuwv8obeik/mlZyN803GZJy5JpXMvJkPzcX3IjxuZEF1So5OPhmlLHytzC8zVUKZurJ4O6kXGR5l9GcsSX78lqEVJb/GkeSTJ0tuE5eYnuJtHA7hMG4WPHEkNiDqeDQYsS4s73oxfJqFjCcJe4hSFo3B03b1jHX7NAOZxdI0RNLE7XtkNAM5NbVSYeRFk+8obHchw7ijjG3uacCq2l1UJQOMhiOCv8dHIyU/Tbbwe03H80HKxv87RV8HmVnC/qJv5WCiY1qOKHFR7zsyqiDjo+g3nE6tWtnhgxGVIYw4PhPyLVdbYcsgs4+kKHmNRlSbfGlrNL+l/4uQoc4BRIfTnXEW0VP+253Jrc5plDit7tvWdX2Q7ZKzT8k+JdulQLv26RUx+QY546YmEXPhtwAAAABJRU5ErkJggg==\" width=\"20.5\" height=\"18.5\" style=\"width: 20.5px; height: 18.5px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e), MB (\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAAlCAYAAADfosCNAAADNElEQVRYR+3XW6inYxQG8N+EIiFSpkZcSZIL4UJIczEXGjnlxpkcc8wQI8k45XymSELMOEaIC6EohVJKEjdckHAh5JBD9Gi90+frf9p7vj21s9/aF/v71vt+z/usZz1r/ZdZBGvZIsBoCeRQWfrfMrkPLsQh2Bqv42581GN2J6zBbvgGK3ALPuxnYGgmD8KdeBKf4QQch/dwGj4pALvgQXyFy/BLxa2ruHe6QIcEuS1uL4Bv1Ue2xFpch6twQz2/GJfiKLxfz3bG4/gWF+DHBnRIkHviaNyGPztM7IeX8RICLpcJmFzgeHxXsVvUZU7tgZ9oQTnkYJyCAxEQYSgf3ICve9pJfP5+6z3PvqfxarF5AF6rZxdVqtuWk/FYaTWy+XeNYzKiTorOHWMjn+IsvD2DzTQmz8fzOAIvlibD7K+dM6LhJ0rXkcnv40A2HR2LO/Am/sC+OA+H16ER94n4YgrQ0wvYmaW3BuTGYvavzv6RFxjF5P64tVhs1djOiZ5iE43hM/DwBJDLcS/uK6kkdBLIVSWFVP5Glvsg8/+V+Bzrx3x8bzyLvfppGaHR+OCXVfF/1/tNTvcOuAY3jyiMhmE73I+TxuiqySj+uGtJZlS1v4JNKpxJMtumGDy7LpRLNZbavkNxZGnu595hzQ/7FpQsXl2VfRg2Gvp8fLLLZIDE/7ordhWTvh4/dV5Enym6R5BKv7znhzt29J1i+36aBU1icvfyybSy+FrXL6PTh/Bux6RzVow6vTxG/wZaW/y42EuFpxHchLhA61gTfXISyGPwaPnkU53A6O8BrB6z+QV0GQqzlxTgDBi5fCwvff4/8plrupOS2ENaWQaDvt5m8Pa5h8wFZGIzgq1Eiia33yxrLiBTsRmlYuR9k19QsLOCTEGkjV2xuQE2053GQgOYgeODacEL8X4ak3uULWT8HzfxbFXV2O0qg2KdBLJZwj193+ogSNc4B2lx6fcLssaBzI+iu/BMjWqjPr59+V6M+Fp0R65BwY4C2bpBWt60lW7T/Z0yLX5e7/sgw05mv0w4s6znkJnyh1mC5xszrXDme+6g+5ZADkXnEpNLTA7FwFDnLApN/gPDFrEmYO82LQAAAABJRU5ErkJggg==\" width=\"20.5\" height=\"18.5\" style=\"width: 20.5px; height: 18.5px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e), GB (\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGg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nkvwQmNmDc5C9x31fysgx6JzhckVJsdiYKx9loUm/wOwnrImUJejJAAAAABJRU5ErkJggg==\" width=\"20.5\" height=\"18.5\" style=\"width: 20.5px; height: 18.5px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e) rounded to 2 decimal places. There must be at least a non-zero integer value to display it in some units, you should always use the greatest unit possible, and data cannot be stored in less than 1 byte (8 bits).\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-style: italic; font-weight: 700; \"\u003eNext:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003ca target='_blank' href = \"https://www.mathworks.com/matlabcentral/cody/problems/46973-how-many-bytes-an-audio-requires-from-ram\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eHow many bytes an audio requires from RAM? Problem 46973\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-style: italic; \"\u003eHow many bytes a video requires from RAM?\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = image_size(w,h,t)\r\n  y = w/h/t;\r\nend","test_suite":"%% anti-hacking\r\n\r\nfiletext = fileread('image_size.m');\r\nassert(isempty(strfind(filetext, 'eval')),       'eval is forbidden.');\r\nassert(isempty(strfind(filetext, 'str2num')),    'str2num is forbidden.');\r\nassert(isempty(strfind(filetext, 'fopen')),      'fopen is forbidden.');\r\nassert(isempty(strfind(filetext, 'regexp')),     'regexp is forbidden.');\r\nassert(isempty(strfind(filetext, '!')),          'Shell commands are forbidden.');\r\nassert(isempty(strfind(filetext, 'mlock')),      'mlock is forbidden.');\r\nassert(isempty(strfind(filetext, 'munlock')),    'munlock is forbidden.');\r\n\r\n%%\r\nw = 3; \r\nh = 4;\r\nt = 'BW';\r\nassert(strcmp(image_size(w, h, t), '2.00 bytes'));\r\n%%\r\nw = 25; \r\nh = 25;\r\nt = 'L';\r\nassert(strcmp(image_size(w, h, t), '625.00 bytes'));\r\n%%\r\nw = 11; \r\nh = 13;\r\nt = 'RGB';\r\nassert(strcmp(image_size(w, h, t), '429.00 bytes'));\r\n%%\r\n% 720p resolution\r\nw = 1280; \r\nh = 720;\r\nt = 'BW';\r\nassert(strcmp(image_size(w, h, t), '112.50 KB'));\r\n%%\r\n% 720p resolution\r\nw = 1280;\r\nh = 720;\r\nt = 'L';\r\nassert(strcmp(image_size(w, h, t), '900.00 KB'));\r\n%%\r\n% 720p resolution\r\nw = 1280;\r\nh = 720;\r\nt = 'RGB';\r\nassert(strcmp(image_size(w, h, t), '2.64 MB'));\r\n%%\r\n% 720p resolution\r\nw = 1280;\r\nh = 720;\r\nt = 'RGBA';\r\nassert(strcmp(image_size(w, h, t), '3.52 MB'));\r\n%%\r\nw = 1925;\r\nh = 1083;\r\nt = 'BW';\r\nassert(strcmp(image_size(w, h, t), '254.49 KB'));\r\n%%\r\nw = 2000;\r\nh = 1007;\r\nt = 'BW';\r\nassert(strcmp(image_size(w, h, t), '245.85 KB'));\r\n%%\r\nw = 1117;\r\nh = 1050;\r\nt = 'BW';\r\nassert(strcmp(image_size(w, h, t), '143.17 KB'));\r\n%%\r\n% UHD resolution\r\nw = 3840;\r\nh = 2160;\r\nt = 'RGB';\r\nassert(strcmp(image_size(w, h, t), '23.73 MB'));\r\n%%\r\n% 4K resolution\r\nw = 4096;\r\nh = 2160;\r\nt = 'L';\r\nassert(strcmp(image_size(w, h, t), '8.44 MB'));\r\n%%\r\n% 8K resolution\r\nw = 7680;\r\nh = 4320;\r\nt = 'BW';\r\nassert(strcmp(image_size(w, h, t), '3.96 MB'));\r\n%%\r\n% 16K resolution \r\nw = 15360;\r\nh = 8640;\r\nt = 'RGBA';\r\nassert(strcmp(image_size(w, h, t), '506.25 MB'));\r\n%%\r\n% 32K resolution \r\nw = 30720;\r\nh = 17280;\r\nt = 'RGB';\r\nassert(strcmp(image_size(w, h, t), '1.48 GB'));\r\n%%\r\n% 32K resolution \r\nw = 30720;\r\nh = 17280;\r\nt = 'RGBA';\r\nassert(strcmp(image_size(w, h, t), '1.98 GB'));\r\n%%\r\n% 64K resolution \r\nw = 61440;\r\nh = 34560;\r\nt = 'RGB';\r\nassert(strcmp(image_size(w, h, t), '5.93 GB'));\r\n%%\r\n% 64K resolution \r\nw = 61440;\r\nh = 34560;\r\nt = 'RGBA';\r\nassert(strcmp(image_size(w, h, t), '7.91 GB'));\r\n%%\r\n% 128K resolution \r\nw = 122880;\r\nh = 69120;\r\nt = 'RGBA';\r\nassert(strcmp(image_size(w, h, t), '31.64 GB'));","published":true,"deleted":false,"likes_count":0,"comments_count":1,"created_by":443343,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":15,"test_suite_updated_at":"2020-10-26T20:23:26.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2020-10-18T16:39:34.000Z","updated_at":"2026-03-24T11:49:13.000Z","published_at":"2020-10-18T19:36:52.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSeveral algorithms store compressed images at our computers; types such as FIG, JPG, or PNG help software to identify them. On the other hand, whenever we visualize an image on a display screen, it must be decompressed to its total size: displaying a compressed image is utterly incomprehensible to humans. Your task is to compute this total size.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eAn image total size in bits is calculated with the following formula: \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003es = w*h*\\\\delta\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e, in which \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ew\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e is its width, \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003eh\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e is its height, \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e\\\\delta\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e is its pixel depth, the number of bits used to store color intensity. Usually, image dimensions are easily obtained from any software, but its pixel depth is not always available. Nevertheless, it is easy to guess the latter since:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[Black-and-white (BW) images have 1-bit pixel depth.\\nGrayscale (L) images have 8-bit pixel depth.\\nRGB (colored) images have 24-bit pixel depth.\\nRGBA (transparency) images has 32-bit pixel depth.]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eCompute how many bytes an image requires from RAM, given its w, h, and a string informing the type of the image: BW, L, RGB, or RGBA. \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003eMoreover, make the results more human-readable by showing them with units: bytes (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e2^{0}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e), KB (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e2^{10}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e), MB (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e2^{20}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e), GB (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e2^{30}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e) rounded to 2 decimal places. There must be at least a non-zero integer value to display it in some units, you should always use the greatest unit possible, and data cannot be stored in less than 1 byte (8 bits).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eNext:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:hyperlink w:docLocation=\\\"https://www.mathworks.com/matlabcentral/cody/problems/46973-how-many-bytes-an-audio-requires-from-ram\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eHow many bytes an audio requires from RAM? Problem 46973\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eHow many bytes a video requires from RAM?\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":46973,"title":"How many bytes an audio requires from RAM?","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none solid rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 670.4px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 335.2px; transform-origin: 407px 335.2px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 62.4px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 31.2px; text-align: left; transform-origin: 384px 31.2px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eAudio files, as many other files are stored compressed in our computers: MP3, OGG, or M4A, are all different types of compressed audio files. Audio must be first decompressed to its total size before it can be played: hearing compressed audio is utterly incomprehensible to humans. Your task is to compute its full length.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 104px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 52px; text-align: left; transform-origin: 384px 52px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eWe may calculate an audio size in bits with the following formula: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMMAAAAjCAYAAAApO74oAAAInUlEQVR4Xu2bB8hk1RXHf6sSa4yJiAUxijEhib03oqIGjcSIxq6xxYbB3o29orHEXrE37IoosYsaC3bFWFETrNhLEju/9dzl7Xwz39z3Zma/XeZe+Fh25r17z/3fU/7nnDvjKKMgUBAYj8C4gkNBoCDwPQLFGIomFAQCgWIMRRUKAsUYig4UBCZGoESGohEFgRIZig4UBEpkKDowPAhMA6wIbAmsDPwUeBy4CzgFeLUKRaFJw6MYw7bTGYHDgI+Aa4EPgU2BA4AfArcDfwLeTMAUYxg2FRme/W4D/AA4E/g2tm2kOBTYvxjDxIqwUID0zPDox9DsdHrgROCF+DcZgwBoEPMAH8TfBFCGNTLMC5wBHAHcPzQqMjwbnRo4OGjQXsA1wDfdtj+MxmASdRogp5RDvtENpPL9FInAL4HzgV8BpwPHAu+PtpNhMoapgFWB44BFInzuC3zR8KjXB44H9gCuajjHIF/TO+4CbA1sP5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qr5WRJqXQ1jU8XxXapLnp8H2Tci/8eS1HKqJiWZnSMJoUCtrJ0guWzudepUsa/3zRUJsrcNVZ6QBHpa51jEEPa7VCqtFLSGx6KOW9gsBAEcg1Bp+zguSdGZPOfnjVgW6sTF4QqItArjFY/7ZqYq7QtKlUV7byfEFgkiLQzhjkrN5E9MKV5Td/12BL34S5btd2km6mLFYQ6AWBdsaQrgLbafVilwZgAjrqT+Z6EaK8WxCYHBBoZwzpV2HKd1LcWMxpTE0O+ykyFAQaI5CbMzReoLxYEJhSECjGMKWcVJFz4Ah8B1EiEkJep96vAAAAAElFTkSuQmCC\" width=\"97.5\" height=\"17.5\" style=\"width: 97.5px; height: 17.5px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e, in which \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003et\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e is its duration in minutes/seconds, \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003es\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e is its sample rate in hertz (Hz), \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003ec\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e is its number of channels, and \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003eδ\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e is its bit depth, the number of bits used to store audio intensity. Usually, an audio file's duration is easily obtained from any software, but the other parameters are not always available. Sometimes the bitrate is presented instead, which is defined as \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJ0AAAAjCAYAAACO5gjTAAAHj0lEQVR4Xu2bBahtRRSGv2e3qJiY2IiFHYhgd3d3dyB2FwYmJnZ3gF3Yhd2CiorYjYHFB2se+56399n7xDtPrzNw4Z579p5Y86+1/vXP3BHkli0wYAuMGPB4ebhsATLoMggGboEMuoGbPA+YQZcxMHALZNAN3OR5wKag87nJgF+A37PZsgV6sUA70K0BrA7MDywE/ASsBbzYy4D53WFnATE0G7AdIGYWBj4CngUuAB4D/iquui7STQCcBuwB3AtsBXw17MyWF9StBcTPJsBqwGXAW8DiwHHA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WrSa1KHBjpNx+rEda0uv/jphltLvpSx76UpD8dHQ15Mp3l0aRHtlPL305TyOZxaSnLeqJ2lnNrxE+6q6rd7m2/Fq2QLUFMugyOgZugQy6gZs8D5hBlzEwcAtk0A3c5HnADLqMgYFbIINu4CbPA2bQZQwM3AL/ALG9wjMB4nimAAAAAElFTkSuQmCC\" width=\"78.5\" height=\"17.5\" style=\"width: 78.5px; height: 17.5px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e and is given as kbps \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003e(kilobits per second)\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e. Bit rate is used as a measure of quality for digital streamming:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 100px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 404px 50px; transform-origin: 404px 50px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10px; transform-origin: 404px 10px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eDigital \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003eWalkie-talkies have a bitrate of 16kbps.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10px; transform-origin: 404px 10px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eOn-line AM \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003eradio has a bitrate of 32kbps.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10px; transform-origin: 404px 10px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eOn-line FM \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003eradio has a bitrate of 96kbps.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10px; transform-origin: 404px 10px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eCD \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003eaudio has a bitrate of 1\u003c/span\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e,411 kbps.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10px; transform-origin: 404px 10px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eHD \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003eaudio may have a bitrate up to 9\u003c/span\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e,216 kbps. (over 24 bit-depth, and 44 kHz sample rate)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 104px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 10px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 10px; perspective-origin: 384px 52px; text-align: left; transform-origin: 384px 52px; white-space: pre-wrap; margin-left: 4px; margin-top: 10px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eCompute how many bytes an image requires from RAM, given its duration (d) and bitrate (b) or sample rate (s), number of channels (c) and  bit depth \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003eδ\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003e. \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eMoreover, make the results more human-readable by showing them with units: bytes (\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAAAlCAYAAAC6TzLyAAACbUlEQVRYR+3WSchOcRQG8N8XFhIiRSlWkqzEglKysFAyZWMmY4QMGZJMC1OZYmGhyJBpg2wsFGVBKRvJio2EhSiUITr1v1/X7R3uO+jdfHf3dv/vec7z/M/znNulg09XB7H1gHdE/f8h+2BswQi8x3AcxfMiw3aDD8U5vMV2fMN87MNyPM430E7wqLUZ2zAbTxPQEFzCB2zAl6yBdoJnIL2xAB8TSC8cxLJCUzWtFkUmYykmYTQe4i6u4l3hDifiPq5jU5I8O7IEF9MsnKjHPIYmul1XxQavsBqPcu9n4na685D/e+7dQlxGAO/Ej3hXSfZgHAfm4Tge4CfGYT1mpKIxPIvwJv3OAA5hD37Xa6wS+AQcS6xfFpj3S7bJFFmJ8yXAp6UrCSd0q1IEj9+78RpXqkg+FjcxpiBjy7IPxH4cqTBQWS/9cRaLC/c7Pg3jvVYHrlbc9k2M16RGo9k/qGa1UHNvmvTp+aBpxud55rNwJ3UatTZiR8HPg3JzsQKf6lmtFvORyecRneHfvN+zeH2R2MbEz8FhrEo50V27GeZzcSH5/FqFLodhK6KRWCzRbFj2SbqepsFDwrBLRGcsjq+t7OJGmGd3OhUxbMGqpacR8ClpNUbAFMOnqSbKgkegRGzuahdwtWwvssiAY9E8a4pilT/VYz4q2eRUYYPly/VJU/yr0cZqgWcWOV30Zw4kNuBaRKTGPmjoqQYeH30ncSOt1EpFByASK4LkQGGFlmqiEniWUhGd9Z5It/z3Wr3z/7wvggebM2ljlSl0C7HTP5c5XDxTb+CaqVn6Pz3gpaVq58Ee2dupZulaHZX9L3ywhyYj6PqEAAAAAElFTkSuQmCC\" width=\"15.5\" height=\"18.5\" style=\"width: 15.5px; height: 18.5px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e), KB (\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAAlCAYAAADfosCNAAACy0lEQVRYR+3XXeiOdxzH8dc/VrQQKWrFWi1pNYkDSolysBLb2skwI495zEM2sTwd2CjbZAcOhuUhTyfIiQNFOaCUE8kRJ0vjQFMsTPSt36Wrq+u67v99u+9//fP/nd3dv4f37/P7fj/f79WlF4yuXsCoD7Jdr/ReKxmX/xw/4A9cK1F1GNZjFP7BR9iDW8W5nVDyY6zCV/gEU0ogR+Ag/sYmPMO32I6FxfmdgByA59iKnSWQceY6bMSXuJGUG46jeIjVeJIp2gnIbO+fKiAzmP6Yg0dpQT/swoICfK0FxSbxVN9jMsbgCi7gBB40yN4qyEm4hFNYm54622o+/kqx+msjJSOo41YrKkDuYimu1oBWQc7CuRST8ez/5faYi2MIwB/xIv4re+5QMCZ8g324jJcYj5WYmTaNjJ2H+xWgVZAZyG7EnFe59aUXKIOciL1JxTsFgA+TTWQKL8afbYSckUIhMv+tykXI+L0F93C84vDPcAZji89SmN+x5x6CHfilJjEGJYP+riKuGmX3hJR8F981ceoSd2BScFm6UFzqdcmCZi0oXnFbyuwv8obeik/mlZyN803GZJy5JpXMvJkPzcX3IjxuZEF1So5OPhmlLHytzC8zVUKZurJ4O6kXGR5l9GcsSX78lqEVJb/GkeSTJ0tuE5eYnuJtHA7hMG4WPHEkNiDqeDQYsS4s73oxfJqFjCcJe4hSFo3B03b1jHX7NAOZxdI0RNLE7XtkNAM5NbVSYeRFk+8obHchw7ijjG3uacCq2l1UJQOMhiOCv8dHIyU/Tbbwe03H80HKxv87RV8HmVnC/qJv5WCiY1qOKHFR7zsyqiDjo+g3nE6tWtnhgxGVIYw4PhPyLVdbYcsgs4+kKHmNRlSbfGlrNL+l/4uQoc4BRIfTnXEW0VP+253Jrc5plDit7tvWdX2Q7ZKzT8k+JdulQLv26RUx+QY546YmEXPhtwAAAABJRU5ErkJggg==\" width=\"20.5\" height=\"18.5\" style=\"width: 20.5px; height: 18.5px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e), MB (\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAAlCAYAAADfosCNAAADNElEQVRYR+3XW6inYxQG8N+EIiFSpkZcSZIL4UJIczEXGjnlxpkcc8wQI8k45XymSELMOEaIC6EohVJKEjdckHAh5JBD9Gi90+frf9p7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cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e), GB (\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAAlCAYAAADfosCNAAADN0lEQVRYR+3XWch2YxQG4OvPlDlTRIYTSaKUA0okISVTSmYyZp4yJnOmMlMOFJmnA0RyoJADSilJjogkHIhCmbtrPX/73737fb9hf399+Z6zd+/1Pute97rX/Tx7lWWwVi0DjFZAjtWl/y2Te+IyHFVMvoJb8U2P2S1xOXbC99gBd+OTfgfGZnIvXIdH8QWOwe14DRfi1wKwLR7Dt7gKv+EE3IQz8EEX6JggN8AVeBpfV5I8CzsH4vgCnpxh+kocjY8qdms8hR9wEX5pQMcEuTG26gBsOW7AATgV36GBWRcn4scKXKdkcXoP/FQLyib74zTsh93wLl7Hs5Vw1gBvjofwFp7Dv9gXb+MFXFKtbvukkCdLq/fNYjKijtjPH0ARvZ2D96agTKszGJvgNvxesUfi1dJk2t6e5/VJJZcAvAZ/5OGkdofBBByHe/EO/sTeuABHVLKI+2R81QOa/x9cujus3kVr0Wta24DcgUjh787/JxYwCeQ+uKdY/LwHILrLIDSGz8LjA2yuX629HocWyDAUHWa4JoE8pKSQyV/Nch9kfmfTL/HMQPI98BJ2xxptGYiPLT2Pz5CiMumLaneEfjPumjIYm+IRnDKgqz7WjfAAdqxW71LD98ZiB2fa1G5YDJ5bBaWoTO3QavHRXnSZQYpG+xaULt5Yw3Z419AX4pNdJnP05TSZtrYvDYbNtDk5L8bVPT/coqPvM/HTLAualnTn8skcZc2gE79NWc0/JZdMfWzoUuRZ9PtXbdyOxeg07IXlHKF34uzy49UYFsLksXiifDID0VYmPwnDQtb7+BRv4sMC2i1+u2p/AOeCkeJjeYldQz7zBZmWxB7id7kYtAvDjI4v7vV8QDYtHYQMTapfK2s+IONvuUrFyPsmv6Rg5woyxp0T4tq1DTDVzwVkA5gLx8dLStnA5rNA7lq2EI8buvGsV9PY7GX0OqaBbJbwYN+3OihyapyHHHE575dkDYHMR9H9eLGuapOSb1aeGCO+pXflGhXsJJDtNGhfe9MS5nOg+50yKri2WR9k2Hm4bjhzSfhyXb9+nkvwQmNmDc5C9x31fysgx6JzhckVJsdiYKx9loUm/wOwnrImUJejJAAAAABJRU5ErkJggg==\" width=\"20.5\" height=\"18.5\" style=\"width: 20.5px; height: 18.5px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e) rounded to 2 decimal places. There must be at least a non-zero integer value to display it in some units, you should always use the greatest unit possible, and data cannot be stored in less than 1 byte (8 bits).\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 41.6px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 20.8px; text-align: left; transform-origin: 384px 20.8px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eNote-1\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e: The range of \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Hearing_range\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003ehuman hearing\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e is 20 to 20,000 Hz, and unsurprisingly, audio sampling rate is usally greater than 40,000 Hz (\u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Nyquist_rate\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eNyquist rate\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e).\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 62.4px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 31.2px; text-align: left; transform-origin: 384px 31.2px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eNote-2\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e: Audio files do not need to be necessarily wholly loaded into the RAM; they only require that a certain amount of bytes per second be always available in it (their bitrate). However, loading full audio files into RAM for playing is the best option to guarantee a smooth sound (without lag). \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-style: italic; font-weight: 700; \"\u003eNext:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003ca target='_blank' href = \"https://www.mathworks.com/matlabcentral/cody/problems/46913-how-many-bytes-an-image-requires-from-ram\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eHow many bytes an image requires from RAM? (Problem 46913)\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-style: italic; \"\u003eHow many bytes a video requires from RAM?\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = audio_size(t,s,c,d,b)\r\n  y = t/s/c/d; % or t/b?\r\nend","test_suite":"%% anti-hacking\r\n\r\nfiletext = fileread('audio_size.m');\r\nassert(~contains(filetext, 'eval'),       'eval is forbidden.');\r\nassert(~contains(filetext, 'fopen'),      'fopen is forbidden.');\r\nassert(~contains(filetext, 'regexp'),     'regexp is forbidden.');\r\nassert(~contains(filetext, '!'),          'Shell commands are forbidden.');\r\nassert(~contains(filetext, 'mlock'),      'mlock is forbidden.');\r\nassert(~contains(filetext, 'munlock'),    'munlock is forbidden.');\r\n\r\n%%case 1. The Song of the White Wolf - Sonya Belousova - The Witcher (55)\r\nt = '3m45s'; \r\ns = 44100;\r\nc = 5;\r\nd = 32;\r\nassert(strcmp(audio_size(t,s,c,d,[]), '189.26 MB'));\r\n\r\n%%case 2. Overture - Gerard Marino - God of War III Original V(001)\r\nt = '3m36s';\r\nb = 9216;\r\nassert(strcmp(audio_size(t,[],[],[],b), '237.30 MB'));\r\n\r\n%%case 3. Rip \u0026 Tear - Mick Gordon - Doom (Original Game Soundtra(002)\r\nt = '4m17s'; \r\ns = 384000;\r\nc = 7;\r\nd = 24;\r\nassert(strcmp(audio_size(t,s,c,d,[]), '1.93 GB'));\r\n\r\n%%case 4. Live Free or Die - Volturnus - Audiomachine\r\nt = '3m13s';\r\nb = 1411;\r\nassert(strcmp(audio_size(t,[],[],[],b), '32.46 MB'));\r\n\r\n%%case 5. Bury the Light - Vergil's battle theme from Devil May Cry 5 Special Edition\r\nt = '9m42s';\r\nb = 132;\r\nassert(strcmp(audio_size(t,[],[],[],b), '9.16 MB'));\r\n\r\n%%case 6. Rob The Frontier - UVERworld - Nanatsu no Taizai Season 3 Opening V2\r\nt = '1m30s'; \r\ns = 22050;\r\nc = 2;\r\nd = 16;\r\nassert(strcmp(audio_size(t,s,c,d,[]), '7.57 MB'));\r\n\r\n%%case 7. Ich Will - Rammstein\r\nt = '3m37s'; \r\ns = 384000;\r\nc = 2;\r\nd = 16;\r\nassert(strcmp(audio_size(t,s,c,d,[]), '317.87 MB'));\r\n\r\n%%case 8. Ratamahatta - Sepultura \r\nt = '4m30s'; \r\ns = 92000;\r\nc = 2;\r\nd = 24;\r\nassert(strcmp(audio_size(t,s,c,d,[]), '142.14 MB'));\r\n\r\n%%case 9. Dark Crow - Man with a Mission\r\nt = '4m38s';\r\nb = 9216;\r\nassert(strcmp(audio_size(t,[],[],[],b), '305.42 MB'));\r\n\r\n%%case 10. On Our Own - Bobby Brown\r\nt = '4m54s';\r\ns = 22050;\r\nc = 1;\r\nd = 8;\r\nassert(strcmp(audio_size(t,s,c,d,[]), '6.18 MB'));\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":1,"created_by":443343,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":9,"test_suite_updated_at":"2020-10-26T22:59:29.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2020-10-20T20:01:52.000Z","updated_at":"2025-12-07T20:40:07.000Z","published_at":"2020-10-26T20:08:12.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eAudio files, as many other files are stored compressed in our computers: MP3, OGG, or M4A, are all different types of compressed audio files. Audio must be first decompressed to its total size before it can be played: hearing compressed audio is utterly incomprehensible to humans. Your task is to compute its full length.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWe may calculate an audio size in bits with the following formula: \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ey = t*s*c*\\\\delta\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e, in which \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003et\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e is its duration in minutes/seconds, \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003es\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e is its sample rate in hertz (Hz), \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ec\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e is its number of channels, and \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e\\\\delta\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e is its bit depth, the number of bits used to store audio intensity. Usually, an audio file's duration is easily obtained from any software, but the other parameters are not always available. Sometimes the bitrate is presented instead, which is defined as \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003eb = s*c*\\\\delta\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e and is given as kbps \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e(kilobits per second)\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e. Bit rate is used as a measure of quality for digital streamming:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[Digital Walkie-talkies have a bitrate of 16kbps.\\nOn-line AM radio has a bitrate of 32kbps.\\nOn-line FM radio has a bitrate of 96kbps.\\nCD audio has a bitrate of 1,411 kbps.\\nHD audio may have a bitrate up to 9,216 kbps. (over 24 bit-depth, and 44 kHz sample rate)]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eCompute how many bytes an image requires from RAM, given its duration (d) and bitrate (b) or sample rate (s), number of channels (c) and  bit depth \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e\\\\delta\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e. \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003eMoreover, make the results more human-readable by showing them with units: bytes (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e2^{0}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e), KB (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e2^{10}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e), MB (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e2^{20}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e), GB (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e2^{30}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e) rounded to 2 decimal places. There must be at least a non-zero integer value to display it in some units, you should always use the greatest unit possible, and data cannot be stored in less than 1 byte (8 bits).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eNote-1\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e: The range of \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://en.wikipedia.org/wiki/Hearing_range\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ehuman hearing\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is 20 to 20,000 Hz, and unsurprisingly, audio sampling rate is usally greater than 40,000 Hz (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://en.wikipedia.org/wiki/Nyquist_rate\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eNyquist rate\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eNote-2\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e: Audio files do not need to be necessarily wholly loaded into the RAM; they only require that a certain amount of bytes per second be always available in it (their bitrate). However, loading full audio files into RAM for playing is the best option to guarantee a smooth sound (without lag). \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eNext:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:hyperlink w:docLocation=\\\"https://www.mathworks.com/matlabcentral/cody/problems/46913-how-many-bytes-an-image-requires-from-ram\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eHow many bytes an image requires from RAM? (Problem 46913)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eHow many bytes a video requires from RAM?\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"}],"problem_search":{"errors":[],"problems":[{"id":46913,"title":"How many bytes an image requires from RAM?","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none solid rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 406.4px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 203.2px; transform-origin: 407px 203.2px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 62.4px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 31.2px; text-align: left; transform-origin: 384px 31.2px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eSeveral algorithms store compressed images at our computers; types such as FIG, JPG, or PNG help software to identify them. On the other hand, whenever we visualize an image on a display screen, it must be decompressed to its total size: displaying a compressed image is utterly incomprehensible to humans. Your task is to compute this total size.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 62.4px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 31.2px; text-align: left; transform-origin: 384px 31.2px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eAn image total size in bits is calculated with the following formula: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKMAAAAjCAYAAAD43LpYAAAHmElEQVR4Xu2aB6h1xRWFPwuKvXexYEOxIBbEEkVjNIol9l6wo7GXRBM1xSSoUewtISR27IqINbEr9hoLYsVeY0tCLHxhz8+8+2455753eOfBDIjvv/ecuXv2rL332mtmKsooHmiJB6ZqiR3FjOIBChgLCFrjgQLG1mxFMaSAsWCgNR4oYGzNVhRDChgnHwZmAKYBvph8pve3uICx/Tu6ErA+sCLg3ysDWwA3tt90pgXWBvYA1gMWBZ4A/g6cBbyWr6GAcRLsKDAT8AfgIOApYHvgxZabrs2/Bj4DrgU+BXYGjgNmAe4AdgPeSesoYGz5joZ5luXfAD8HLgYOBD5vuel7AdMB5wPfha1myl8BxxYwtnz3+pg3R4BwU+Bw4PSWL0Veq40vxf8TGDVbQC4CfBL/TVlKyYwt39UwT754NTA/8GPg/pabbSY/IcrwUcA1wLeDbC5gHOShdnwv17oE+EfwrrfbYVZfK5YF/gIsB5wLnAx83O+NAsZmdnVb4I/AEcBVY/wJeZfNy2FR8n4G/HeMc3a+Pp725nP/ALgQWAZ4BDgUeDDjkCPs6AdGv1NGOBKYNSazTDwHrBqt+WPj7JTxmE75YHlgtZAVjMZ9oqvL57eUyL/eAK7MvvD9C4DFgH2Be4Yw6pfRSR4fjccQU0x5ZUHg0pBGdom/3RtL9yEh8yiXuJanh/yh8bS30wT34aKQpdwL7XQ9/+t8sB8YBZw85XHAzkjCOTtwJrAEsBPweoXFpxJT4dG+j6hXVeVKkmQBaHl4BtgOeKFj9rXCKQLmb9l3kmv/vW68b3b7dx/L9KHB+nWWsZRergB2y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ntpuVPSkuC3AsD+nRURuiBoGSfzYmdqcGUj2FPZZqwN+eCvRopg9Kqag/SbT2jOONc0ax4rpjrcrlMkmtnVSJxIp/JA8HOTjD+JwzKmwMlE8udt2ISJ6tqt9xa/mlT8VaU0dRYJF5k0KvN2lQ9W+WcFkhzaI8nJB42pNHtVMaMvhBw7wDDm7DXDl9ua/Yb1ZjEFTgzptldDq06oG49YnRmxpRuz+uIxBSlOqHTMVU3bSKeSxHbKU9pi4HnScBGcTdw2NOWbusa64nGoCtjuWwl4JWM5MQ2Z6nTruPvsdprtvOgQBmt81aRGEuVQXnQ8tz1LmYnGFMGtCW3c3slOm4zjJ3SZOuoExjtam1a8qtMSfqRlth0pC6vzib2etbqoawkPx2m4cubk25XxnK+qGzl6Ya/Z9YdZozV3hxwaoeWaquEn1txTG4PhD76Zi8DO8FoXTfzqYttErdzTf+2/3ZLbtjAq0DDeKOhd9w0BeKfdskYZnnlGzs6uWMO1PEwx/nraIr5byawzdxDP7SCyUG9O+D1LPn8iCv8QyxgLPb6c2LJcm0Dt3gI2h4eeMPbgDR798VOlW56iHWVV4oH6nuggLG+z8obDXmggLEhx5Zp63uggLG+z8obDXmggLEhx5Zp63uggLG+z8obDXmggLEhx5Zp63uggLG+z8obDXnge2Ha3DPCCRciAAAAAElFTkSuQmCC\" width=\"81.5\" height=\"17.5\" style=\"width: 81.5px; height: 17.5px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e, in which \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003ew\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e is its width, \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003eh\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e is its height, \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003eδ\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e is its pixel depth, the number of bits used to store color intensity. Usually, image dimensions are easily obtained from any software, but its pixel depth is not always available. Nevertheless, it is easy to guess the latter since:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 80px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 404px 40px; transform-origin: 404px 40px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10px; transform-origin: 404px 10px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eBlack-and-white (BW) images \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003ehave 1-bit pixel depth.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10px; transform-origin: 404px 10px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eGrayscale (L) images \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003ehave 8-bit pixel depth.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10px; transform-origin: 404px 10px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eRGB (colored) images \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003ehave 24-bit pixel depth.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10px; transform-origin: 404px 10px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eRGBA (transparency) images \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003ehas 32-bit pixel depth.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 83.2px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 10px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 10px; perspective-origin: 384px 41.6px; text-align: left; transform-origin: 384px 41.6px; white-space: pre-wrap; margin-left: 4px; margin-top: 10px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eCompute how many bytes an image requires from RAM, given its w, h, and a string informing the type of the image: BW, L, RGB, or RGBA. \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eMoreover, make the results more human-readable by showing them with units: bytes (\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAAAlCAYAAAC6TzLyAAACbUlEQVRYR+3WSchOcRQG8N8XFhIiRSlWkqzEglKysFAyZWMmY4QMGZJMC1OZYmGhyJBpg2wsFGVBKRvJio2EhSiUITr1v1/X7R3uO+jdfHf3dv/vec7z/M/znNulg09XB7H1gHdE/f8h+2BswQi8x3AcxfMiw3aDD8U5vMV2fMN87MNyPM430E7wqLUZ2zAbTxPQEFzCB2zAl6yBdoJnIL2xAB8TSC8cxLJCUzWtFkUmYykmYTQe4i6u4l3hDifiPq5jU5I8O7IEF9MsnKjHPIYmul1XxQavsBqPcu9n4na685D/e+7dQlxGAO/Ej3hXSfZgHAfm4Tge4CfGYT1mpKIxPIvwJv3OAA5hD37Xa6wS+AQcS6xfFpj3S7bJFFmJ8yXAp6UrCSd0q1IEj9+78RpXqkg+FjcxpiBjy7IPxH4cqTBQWS/9cRaLC/c7Pg3jvVYHrlbc9k2M16RGo9k/qGa1UHNvmvTp+aBpxud55rNwJ3UatTZiR8HPg3JzsQKf6lmtFvORyecRneHfvN+zeH2R2MbEz8FhrEo50V27GeZzcSH5/FqFLodhK6KRWCzRbFj2SbqepsFDwrBLRGcsjq+t7OJGmGd3OhUxbMGqpacR8ClpNUbAFMOnqSbKgkegRGzuahdwtWwvssiAY9E8a4pilT/VYz4q2eRUYYPly/VJU/yr0cZqgWcWOV30Zw4kNuBaRKTGPmjoqQYeH30ncSOt1EpFByASK4LkQGGFlmqiEniWUhGd9Z5It/z3Wr3z/7wvggebM2ljlSl0C7HTP5c5XDxTb+CaqVn6Pz3gpaVq58Ee2dupZulaHZX9L3ywhyYj6PqEAAAAAElFTkSuQmCC\" width=\"15.5\" height=\"18.5\" style=\"width: 15.5px; height: 18.5px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e), KB (\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAAlCAYAAADfosCNAAACy0lEQVRYR+3XXeiOdxzH8dc/VrQQKWrFWi1pNYkDSolysBLb2skwI495zEM2sTwd2CjbZAcOhuUhTyfIiQNFOaCUE8kRJ0vjQFMsTPSt36Wrq+u67v99u+9//fP/nd3dv4f37/P7fj/f79WlF4yuXsCoD7Jdr/ReKxmX/xw/4A9cK1F1GNZjFP7BR9iDW8W5nVDyY6zCV/gEU0ogR+Ag/sYmPMO32I6FxfmdgByA59iKnSWQceY6bMSXuJGUG46jeIjVeJIp2gnIbO+fKiAzmP6Yg0dpQT/swoICfK0FxSbxVN9jMsbgCi7gBB40yN4qyEm4hFNYm54622o+/kqx+msjJSOo41YrKkDuYimu1oBWQc7CuRST8ez/5faYi2MIwB/xIv4re+5QMCZ8g324jJcYj5WYmTaNjJ2H+xWgVZAZyG7EnFe59aUXKIOciL1JxTsFgA+TTWQKL8afbYSckUIhMv+tykXI+L0F93C84vDPcAZji89SmN+x5x6CHfilJjEGJYP+riKuGmX3hJR8F981ceoSd2BScFm6UFzqdcmCZi0oXnFbyuwv8obeik/mlZyN803GZJy5JpXMvJkPzcX3IjxuZEF1So5OPhmlLHytzC8zVUKZurJ4O6kXGR5l9GcsSX78lqEVJb/GkeSTJ0tuE5eYnuJtHA7hMG4WPHEkNiDqeDQYsS4s73oxfJqFjCcJe4hSFo3B03b1jHX7NAOZxdI0RNLE7XtkNAM5NbVSYeRFk+8obHchw7ijjG3uacCq2l1UJQOMhiOCv8dHIyU/Tbbwe03H80HKxv87RV8HmVnC/qJv5WCiY1qOKHFR7zsyqiDjo+g3nE6tWtnhgxGVIYw4PhPyLVdbYcsgs4+kKHmNRlSbfGlrNL+l/4uQoc4BRIfTnXEW0VP+253Jrc5plDit7tvWdX2Q7ZKzT8k+JdulQLv26RUx+QY546YmEXPhtwAAAABJRU5ErkJggg==\" width=\"20.5\" height=\"18.5\" style=\"width: 20.5px; height: 18.5px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e), MB (\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAAlCAYAAADfosCNAAADNElEQVRYR+3XW6inYxQG8N+EIiFSpkZcSZIL4UJIczEXGjnlxpkcc8wQI8k45XymSELMOEaIC6EohVJKEjdckHAh5JBD9Gi90+frf9p7vj21s9/aF/v71vt+z/usZz1r/ZdZBGvZIsBoCeRQWfrfMrkPLsQh2Bqv42581GN2J6zBbvgGK3ALPuxnYGgmD8KdeBKf4QQch/dwGj4pALvgQXyFy/BLxa2ruHe6QIcEuS1uL4Bv1Ue2xFpch6twQz2/GJfiKLxfz3bG4/gWF+DHBnRIkHviaNyGPztM7IeX8RICLpcJmFzgeHxXsVvUZU7tgZ9oQTnkYJyCAxEQYSgf3ICve9pJfP5+6z3PvqfxarF5AF6rZxdVqtuWk/FYaTWy+XeNYzKiTorOHWMjn+IsvD2DzTQmz8fzOAIvlibD7K+dM6LhJ0rXkcnv40A2HR2LO/Am/sC+OA+H16ER94n4YgrQ0wvYmaW3BuTGYvavzv6RFxjF5P64tVhs1djOiZ5iE43hM/DwBJDLcS/uK6kkdBLIVSWFVP5Glvsg8/+V+Bzrx3x8bzyLvfppGaHR+OCXVfF/1/tNTvcOuAY3jyiMhmE73I+TxuiqySj+uGtJZlS1v4JNKpxJMtumGDy7LpRLNZbavkNxZGnu595hzQ/7FpQsXl2VfRg2Gvp8fLLLZIDE/7ordhWTvh4/dV5Enym6R5BKv7znhzt29J1i+36aBU1icvfyybSy+FrXL6PTh/Bux6RzVow6vTxG/wZaW/y42EuFpxHchLhA61gTfXISyGPwaPnkU53A6O8BrB6z+QV0GQqzlxTgDBi5fCwvff4/8plrupOS2ENaWQaDvt5m8Pa5h8wFZGIzgq1Eiia33yxrLiBTsRmlYuR9k19QsLOCTEGkjV2xuQE2053GQgOYgeODacEL8X4ak3uULWT8HzfxbFXV2O0qg2KdBLJZwj193+ogSNc4B2lx6fcLssaBzI+iu/BMjWqjPr59+V6M+Fp0R65BwY4C2bpBWt60lW7T/Z0yLX5e7/sgw05mv0w4s6znkJnyh1mC5xszrXDme+6g+5ZADkXnEpNLTA7FwFDnLApN/gPDFrEmYO82LQAAAABJRU5ErkJggg==\" width=\"20.5\" height=\"18.5\" style=\"width: 20.5px; height: 18.5px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e), GB (\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAAlCAYAAADfosCNAAADN0lEQVRYR+3XWch2YxQG4OvPlDlTRIYTSaKUA0okISVTSmYyZp4yJnOmMlMOFJmnA0RyoJADSilJjogkHIhCmbtrPX/73737fb9hf399+Z6zd+/1Pute97rX/Tx7lWWwVi0DjFZAjtWl/y2Te+IyHFVMvoJb8U2P2S1xOXbC99gBd+OTfgfGZnIvXIdH8QWOwe14DRfi1wKwLR7Dt7gKv+EE3IQz8EEX6JggN8AVeBpfV5I8CzsH4vgCnpxh+kocjY8qdms8hR9wEX5pQMcEuTG26gBsOW7AATgV36GBWRcn4scKXKdkcXoP/FQLyib74zTsh93wLl7Hs5Vw1gBvjofwFp7Dv9gXb+MFXFKtbvukkCdLq/fNYjKijtjPH0ARvZ2D96agTKszGJvgNvxesUfi1dJk2t6e5/VJJZcAvAZ/5OGkdofBBByHe/EO/sTeuABHVLKI+2R81QOa/x9cujus3kVr0Wta24DcgUjh787/JxYwCeQ+uKdY/LwHILrLIDSGz8LjA2yuX629HocWyDAUHWa4JoE8pKSQyV/Nch9kfmfTL/HMQPI98BJ2xxptGYiPLT2Pz5CiMumLaneEfjPumjIYm+IRnDKgqz7WjfAAdqxW71LD98ZiB2fa1G5YDJ5bBaWoTO3QavHRXnSZQYpG+xaULt5Yw3Z419AX4pNdJnP05TSZtrYvDYbNtDk5L8bVPT/coqPvM/HTLAualnTn8skcZc2gE79NWc0/JZdMfWzoUuRZ9PtXbdyOxeg07IXlHKF34uzy49UYFsLksXiifDID0VYmPwnDQtb7+BRv4sMC2i1+u2p/AOeCkeJjeYldQz7zBZmWxB7id7kYtAvDjI4v7vV8QDYtHYQMTapfK2s+IONvuUrFyPsmv6Rg5woyxp0T4tq1DTDVzwVkA5gLx8dLStnA5rNA7lq2EI8buvGsV9PY7GX0OqaBbJbwYN+3OihyapyHHHE575dkDYHMR9H9eLGuapOSb1aeGCO+pXflGhXsJJDtNGhfe9MS5nOg+50yKri2WR9k2Hm4bjhzSfhyXb9+nkvwQmNmDc5C9x31fysgx6JzhckVJsdiYKx9loUm/wOwnrImUJejJAAAAABJRU5ErkJggg==\" width=\"20.5\" height=\"18.5\" style=\"width: 20.5px; height: 18.5px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e) rounded to 2 decimal places. There must be at least a non-zero integer value to display it in some units, you should always use the greatest unit possible, and data cannot be stored in less than 1 byte (8 bits).\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-style: italic; font-weight: 700; \"\u003eNext:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003ca target='_blank' href = \"https://www.mathworks.com/matlabcentral/cody/problems/46973-how-many-bytes-an-audio-requires-from-ram\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eHow many bytes an audio requires from RAM? Problem 46973\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-style: italic; \"\u003eHow many bytes a video requires from RAM?\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = image_size(w,h,t)\r\n  y = w/h/t;\r\nend","test_suite":"%% anti-hacking\r\n\r\nfiletext = fileread('image_size.m');\r\nassert(isempty(strfind(filetext, 'eval')),       'eval is forbidden.');\r\nassert(isempty(strfind(filetext, 'str2num')),    'str2num is forbidden.');\r\nassert(isempty(strfind(filetext, 'fopen')),      'fopen is forbidden.');\r\nassert(isempty(strfind(filetext, 'regexp')),     'regexp is forbidden.');\r\nassert(isempty(strfind(filetext, '!')),          'Shell commands are forbidden.');\r\nassert(isempty(strfind(filetext, 'mlock')),      'mlock is forbidden.');\r\nassert(isempty(strfind(filetext, 'munlock')),    'munlock is forbidden.');\r\n\r\n%%\r\nw = 3; \r\nh = 4;\r\nt = 'BW';\r\nassert(strcmp(image_size(w, h, t), '2.00 bytes'));\r\n%%\r\nw = 25; \r\nh = 25;\r\nt = 'L';\r\nassert(strcmp(image_size(w, h, t), '625.00 bytes'));\r\n%%\r\nw = 11; \r\nh = 13;\r\nt = 'RGB';\r\nassert(strcmp(image_size(w, h, t), '429.00 bytes'));\r\n%%\r\n% 720p resolution\r\nw = 1280; \r\nh = 720;\r\nt = 'BW';\r\nassert(strcmp(image_size(w, h, t), '112.50 KB'));\r\n%%\r\n% 720p resolution\r\nw = 1280;\r\nh = 720;\r\nt = 'L';\r\nassert(strcmp(image_size(w, h, t), '900.00 KB'));\r\n%%\r\n% 720p resolution\r\nw = 1280;\r\nh = 720;\r\nt = 'RGB';\r\nassert(strcmp(image_size(w, h, t), '2.64 MB'));\r\n%%\r\n% 720p resolution\r\nw = 1280;\r\nh = 720;\r\nt = 'RGBA';\r\nassert(strcmp(image_size(w, h, t), '3.52 MB'));\r\n%%\r\nw = 1925;\r\nh = 1083;\r\nt = 'BW';\r\nassert(strcmp(image_size(w, h, t), '254.49 KB'));\r\n%%\r\nw = 2000;\r\nh = 1007;\r\nt = 'BW';\r\nassert(strcmp(image_size(w, h, t), '245.85 KB'));\r\n%%\r\nw = 1117;\r\nh = 1050;\r\nt = 'BW';\r\nassert(strcmp(image_size(w, h, t), '143.17 KB'));\r\n%%\r\n% UHD resolution\r\nw = 3840;\r\nh = 2160;\r\nt = 'RGB';\r\nassert(strcmp(image_size(w, h, t), '23.73 MB'));\r\n%%\r\n% 4K resolution\r\nw = 4096;\r\nh = 2160;\r\nt = 'L';\r\nassert(strcmp(image_size(w, h, t), '8.44 MB'));\r\n%%\r\n% 8K resolution\r\nw = 7680;\r\nh = 4320;\r\nt = 'BW';\r\nassert(strcmp(image_size(w, h, t), '3.96 MB'));\r\n%%\r\n% 16K resolution \r\nw = 15360;\r\nh = 8640;\r\nt = 'RGBA';\r\nassert(strcmp(image_size(w, h, t), '506.25 MB'));\r\n%%\r\n% 32K resolution \r\nw = 30720;\r\nh = 17280;\r\nt = 'RGB';\r\nassert(strcmp(image_size(w, h, t), '1.48 GB'));\r\n%%\r\n% 32K resolution \r\nw = 30720;\r\nh = 17280;\r\nt = 'RGBA';\r\nassert(strcmp(image_size(w, h, t), '1.98 GB'));\r\n%%\r\n% 64K resolution \r\nw = 61440;\r\nh = 34560;\r\nt = 'RGB';\r\nassert(strcmp(image_size(w, h, t), '5.93 GB'));\r\n%%\r\n% 64K resolution \r\nw = 61440;\r\nh = 34560;\r\nt = 'RGBA';\r\nassert(strcmp(image_size(w, h, t), '7.91 GB'));\r\n%%\r\n% 128K resolution \r\nw = 122880;\r\nh = 69120;\r\nt = 'RGBA';\r\nassert(strcmp(image_size(w, h, t), '31.64 GB'));","published":true,"deleted":false,"likes_count":0,"comments_count":1,"created_by":443343,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":15,"test_suite_updated_at":"2020-10-26T20:23:26.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2020-10-18T16:39:34.000Z","updated_at":"2026-03-24T11:49:13.000Z","published_at":"2020-10-18T19:36:52.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSeveral algorithms store compressed images at our computers; types such as FIG, JPG, or PNG help software to identify them. On the other hand, whenever we visualize an image on a display screen, it must be decompressed to its total size: displaying a compressed image is utterly incomprehensible to humans. Your task is to compute this total size.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eAn image total size in bits is calculated with the following formula: \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003es = w*h*\\\\delta\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e, in which \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ew\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e is its width, \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003eh\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e is its height, \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e\\\\delta\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e is its pixel depth, the number of bits used to store color intensity. Usually, image dimensions are easily obtained from any software, but its pixel depth is not always available. Nevertheless, it is easy to guess the latter since:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[Black-and-white (BW) images have 1-bit pixel depth.\\nGrayscale (L) images have 8-bit pixel depth.\\nRGB (colored) images have 24-bit pixel depth.\\nRGBA (transparency) images has 32-bit pixel depth.]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eCompute how many bytes an image requires from RAM, given its w, h, and a string informing the type of the image: BW, L, RGB, or RGBA. \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003eMoreover, make the results more human-readable by showing them with units: bytes (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e2^{0}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e), KB (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e2^{10}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e), MB (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e2^{20}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e), GB (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e2^{30}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e) rounded to 2 decimal places. There must be at least a non-zero integer value to display it in some units, you should always use the greatest unit possible, and data cannot be stored in less than 1 byte (8 bits).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eNext:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:hyperlink w:docLocation=\\\"https://www.mathworks.com/matlabcentral/cody/problems/46973-how-many-bytes-an-audio-requires-from-ram\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eHow many bytes an audio requires from RAM? Problem 46973\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eHow many bytes a video requires from RAM?\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":46973,"title":"How many bytes an audio requires from RAM?","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none solid rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 670.4px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 335.2px; transform-origin: 407px 335.2px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 62.4px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 31.2px; text-align: left; transform-origin: 384px 31.2px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eAudio files, as many other files are stored compressed in our computers: MP3, OGG, or M4A, are all different types of compressed audio files. Audio must be first decompressed to its total size before it can be played: hearing compressed audio is utterly incomprehensible to humans. Your task is to compute its full length.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 104px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 52px; text-align: left; transform-origin: 384px 52px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eWe may calculate an audio size in bits with the following formula: \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMMAAAAjCAYAAAApO74oAAAInUlEQVR4Xu2bB8hk1RXHf6sSa4yJiAUxijEhib03oqIGjcSIxq6xxYbB3o29orHEXrE37IoosYsaC3bFWFETrNhLEju/9dzl7Xwz39z3Zma/XeZe+Fh25r17z/3fU/7nnDvjKKMgUBAYj8C4gkNBoCDwPQLFGIomFAQCgWIMRRUKAsUYig4UBCZGoESGohEFgRIZig4UBEpkKDowPAhMA6wIbAmsDPwUeBy4CzgFeLUKRaFJw6MYw7bTGYHDgI+Aa4EPgU2BA4AfArcDfwLeTMAUYxg2FRme/W4D/AA4E/g2tm2kOBTYvxjDxIqwUID0zPDox9DsdHrgROCF+DcZgwBoEPMAH8TfBFCGNTLMC5wBHAHcPzQqMjwbnRo4OGjQXsA1wDfdtj+MxmASdRogp5RDvtENpPL9FInAL4HzgV8BpwPHAu+PtpNhMoapgFWB44BFInzuC3zR8KjXB44H9gCuajjHIF/TO+4CbA1sP5lHwEFh+RvgbOAXwCPArsA/KznERPh3Mga95+LAEsBiwK+Bw4HzKm8nsPcB/hbK9dUgT7eHuZcDzgLME1rHzcDmrfwxY60Do1pxUGCT8UrHRzwHcd4TmDkObg7gWWDJKAM+WnOBxJs1hM2AS2u+3+lx5VsXWCUw+zqcy7nA1UATHegnlq1yLwWcEzIaGXYPLEbI2ckYBHKGsKgTgGWA6wAzdBMPh5m6BrI34EFtBLyUAXjaeMajHR95EtgQeL7mJCsAtwBvAX8Ensp8X5xUgv9WIonrXxH7vjLmETdx+biT9+mwngqvIj1WwXgW4GRgfmA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AElFTkSuQmCC\" width=\"97.5\" height=\"17.5\" style=\"width: 97.5px; height: 17.5px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e, in which \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003et\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e is its duration in minutes/seconds, \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003es\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e is its sample rate in hertz (Hz), \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003ec\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e is its number of channels, and \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003eδ\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e is its bit depth, the number of bits used to store audio intensity. Usually, an audio file's duration is easily obtained from any software, but the other parameters are not always available. Sometimes the bitrate is presented instead, which is defined as \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJ0AAAAjCAYAAACO5gjTAAAHj0lEQVR4Xu2bBahtRRSGv2e3qJiY2IiFHYhgd3d3dyB2FwYmJnZ3gF3Yhd2CiorYjYHFB2se+56399n7xDtPrzNw4Z579p5Y86+1/vXP3BHkli0wYAuMGPB4ebhsATLoMggGboEMuoGbPA+YQZcxMHALZNAN3OR5wKag87nJgF+A37PZsgV6sUA70K0BrA7MDywE/ASsBbzYy4D53WFnATE0G7AdIGYWBj4CngUuAB4D/iquui7STQCcBuwB3AtsBXw17MyWF9StBcTPJsBqwGXAW8DiwHHAgsCPwHrAQ52AbiLgLGBH4CTgCODPbmeY3xt2FpgP2Bs4GPi+sLqVgZvjc8egmwW4FlgaWAe4c9iZLS+oFwtsAWwA7AB8W+jICDgtMC7waafpdSXgfuCVCKPv9DLD/O6ws8AKwG3AecCJkU5rF9mO0/ndYZGfrwpeZ47OLVsgWWBi4FRgd+DuoF8v15mnHegmBy4BNgT2B86s6+x/+v1GwOnAAcBN/2IbzAFcDjwPHBryVz+maxo9B9AO3wBHBm5+q+q8HegWCDI4XVQnLwArAnsCy8QAtwYYP+7H7AfQx9TAXoBp4VFAx/oMGC/WY9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u+xWpDGlUlsZ6JJUIgm1ElEWaW0p/coXrFyUU5q0MVlIpPmpK1nFGvXaRfKy9fiumpyVvWv3IsSDQagPB4xYcl9BqbcrrtdJE0UH7pcIr3N5Jur4zkUpyN8FgUCTh+pw0qLH4+91e+jlD9euENzOOVIGNI0nlWCILctAl6QSec9mwAct1k/Sg2KgUcOJNE0pYwJ0S8bGFwl9SmcWFZ1cZEjFk5WaG2hUc01yHDOCPE6bSTuaXgWr5UBNvLnlmWKfEn5/jGaCT3DpdKlwWaKh+F/ss8o5lNQsyNYOIbosS45SvRalkrKO9SA1HuWUSh2mCyONzles2ASJEkJqxejiOpJuVTeP8SNdmZI+iY3UwPLDpPPpyGps3tB5vfWwu2SAIp1pF+nU74yuTdJ2moNFzxsRFFJVaTBJPEsgmdF0lrp+DTbOzztzgra1QHBMA5bPaO/KDNga6YpSSWu567PJizs64K3bydH4fUoJAqDodXIdSa6pwGtbVrXdtl5PJBRwjwo5Q13ODCJQUtPuq4Y47Fh14KhaR68nEsV5em1JuxWvM6XIKYilHUo0pVyxFXTeEL49ThqKoNNjdgM85lDf6bZK63Zju30vRTS5haTftWkIDXQd8GEfKlhJumlLzaup1tW6nmKqc17yQ6OF0Um7+y8CZpdeLlwIBqOQRU6nxVOab1FLtGpXGtKeztNANGNkDXljZXHSCjo/W0hsD8wT1Y4bZ2Tw5rCKfree1i1wennP8v2UuAGhwbxWrSa1KHBjpNx+rEda0uv/jphltLvpSx76UpD8dHQ15Mp3l0aRHtlPL305TyOZxaSnLeqJ2lnNrxE+6q6rd7m2/Fq2QLUFMugyOgZugQy6gZs8D5hBlzEwcAtk0A3c5HnADLqMgYFbIINu4CbPA2bQZQwM3AL/ALG9wjMB4nimAAAAAElFTkSuQmCC\" width=\"78.5\" height=\"17.5\" style=\"width: 78.5px; height: 17.5px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e and is given as kbps \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003e(kilobits per second)\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e. Bit rate is used as a measure of quality for digital streamming:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgb(247, 247, 247); block-size: 100px; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; margin-block-end: 10px; margin-block-start: 10px; margin-bottom: 10px; margin-inline-end: 3px; margin-inline-start: 3px; margin-left: 3px; margin-right: 3px; margin-top: 10px; perspective-origin: 404px 50px; transform-origin: 404px 50px; margin-left: 3px; margin-top: 10px; margin-bottom: 10px; margin-right: 3px; \"\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10px; transform-origin: 404px 10px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eDigital \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003eWalkie-talkies have a bitrate of 16kbps.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10px; transform-origin: 404px 10px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eOn-line AM \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003eradio has a bitrate of 32kbps.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10px; transform-origin: 404px 10px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eOn-line FM \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003eradio has a bitrate of 96kbps.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10px; transform-origin: 404px 10px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eCD \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003eaudio has a bitrate of 1\u003c/span\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e,411 kbps.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"background-color: rgba(0, 0, 0, 0); block-size: 20px; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-inline-end-color: rgb(233, 233, 233); border-inline-end-style: solid; border-inline-end-width: 1px; border-inline-start-color: rgb(233, 233, 233); border-inline-start-style: solid; border-inline-start-width: 1px; border-left-color: rgb(233, 233, 233); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(233, 233, 233); border-right-style: solid; border-right-width: 1px; border-top-left-radius: 0px; border-top-right-radius: 0px; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; min-block-size: 18px; min-height: 18px; padding-inline-start: 4px; padding-left: 4px; perspective-origin: 404px 10px; transform-origin: 404px 10px; white-space: nowrap; \"\u003e\u003cspan style=\"block-size: auto; border-inline-end-color: rgb(0, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(0, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(0, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(0, 0, 0); border-right-style: none; border-right-width: 0px; display: inline; margin-inline-end: 45px; margin-right: 45px; min-block-size: 0px; min-height: 0px; padding-inline-start: 0px; padding-left: 0px; perspective-origin: 0px 0px; tab-size: 4; transform-origin: 0px 0px; white-space: pre; margin-right: 45px; \"\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003eHD \u003c/span\u003e\u003cspan style=\"border-block-end-color: rgb(170, 4, 249); border-block-start-color: rgb(170, 4, 249); border-bottom-color: rgb(170, 4, 249); border-inline-end-color: rgb(170, 4, 249); border-inline-start-color: rgb(170, 4, 249); border-left-color: rgb(170, 4, 249); border-right-color: rgb(170, 4, 249); border-top-color: rgb(170, 4, 249); caret-color: rgb(170, 4, 249); color: rgb(170, 4, 249); column-rule-color: rgb(170, 4, 249); margin-inline-end: 0px; margin-right: 0px; outline-color: rgb(170, 4, 249); text-decoration: none; text-decoration-color: rgb(170, 4, 249); \"\u003eaudio may have a bitrate up to 9\u003c/span\u003e\u003cspan style=\"margin-inline-end: 0px; margin-right: 0px; \"\u003e,216 kbps. (over 24 bit-depth, and 44 kHz sample rate)\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 104px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 10px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 10px; perspective-origin: 384px 52px; text-align: left; transform-origin: 384px 52px; white-space: pre-wrap; margin-left: 4px; margin-top: 10px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eCompute how many bytes an image requires from RAM, given its duration (d) and bitrate (b) or sample rate (s), number of channels (c) and  bit depth \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003eδ\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003e. \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eMoreover, make the results more human-readable by showing them with units: bytes (\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAAAlCAYAAAC6TzLyAAACbUlEQVRYR+3WSchOcRQG8N8XFhIiRSlWkqzEglKysFAyZWMmY4QMGZJMC1OZYmGhyJBpg2wsFGVBKRvJio2EhSiUITr1v1/X7R3uO+jdfHf3dv/vec7z/M/znNulg09XB7H1gHdE/f8h+2BswQi8x3AcxfMiw3aDD8U5vMV2fMN87MNyPM430E7wqLUZ2zAbTxPQEFzCB2zAl6yBdoJnIL2xAB8TSC8cxLJCUzWtFkUmYykmYTQe4i6u4l3hDifiPq5jU5I8O7IEF9MsnKjHPIYmul1XxQavsBqPcu9n4na685D/e+7dQlxGAO/Ej3hXSfZgHAfm4Tge4CfGYT1mpKIxPIvwJv3OAA5hD37Xa6wS+AQcS6xfFpj3S7bJFFmJ8yXAp6UrCSd0q1IEj9+78RpXqkg+FjcxpiBjy7IPxH4cqTBQWS/9cRaLC/c7Pg3jvVYHrlbc9k2M16RGo9k/qGa1UHNvmvTp+aBpxud55rNwJ3UatTZiR8HPg3JzsQKf6lmtFvORyecRneHfvN+zeH2R2MbEz8FhrEo50V27GeZzcSH5/FqFLodhK6KRWCzRbFj2SbqepsFDwrBLRGcsjq+t7OJGmGd3OhUxbMGqpacR8ClpNUbAFMOnqSbKgkegRGzuahdwtWwvssiAY9E8a4pilT/VYz4q2eRUYYPly/VJU/yr0cZqgWcWOV30Zw4kNuBaRKTGPmjoqQYeH30ncSOt1EpFByASK4LkQGGFlmqiEniWUhGd9Z5It/z3Wr3z/7wvggebM2ljlSl0C7HTP5c5XDxTb+CaqVn6Pz3gpaVq58Ee2dupZulaHZX9L3ywhyYj6PqEAAAAAElFTkSuQmCC\" width=\"15.5\" height=\"18.5\" style=\"width: 15.5px; height: 18.5px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e), KB (\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAAlCAYAAADfosCNAAACy0lEQVRYR+3XXeiOdxzH8dc/VrQQKWrFWi1pNYkDSolysBLb2skwI495zEM2sTwd2CjbZAcOhuUhTyfIiQNFOaCUE8kRJ0vjQFMsTPSt36Wrq+u67v99u+9//fP/nd3dv4f37/P7fj/f79WlF4yuXsCoD7Jdr/ReKxmX/xw/4A9cK1F1GNZjFP7BR9iDW8W5nVDyY6zCV/gEU0ogR+Ag/sYmPMO32I6FxfmdgByA59iKnSWQceY6bMSXuJGUG46jeIjVeJIp2gnIbO+fKiAzmP6Yg0dpQT/swoICfK0FxSbxVN9jMsbgCi7gBB40yN4qyEm4hFNYm54622o+/kqx+msjJSOo41YrKkDuYimu1oBWQc7CuRST8ez/5faYi2MIwB/xIv4re+5QMCZ8g324jJcYj5WYmTaNjJ2H+xWgVZAZyG7EnFe59aUXKIOciL1JxTsFgA+TTWQKL8afbYSckUIhMv+tykXI+L0F93C84vDPcAZji89SmN+x5x6CHfilJjEGJYP+riKuGmX3hJR8F981ceoSd2BScFm6UFzqdcmCZi0oXnFbyuwv8obeik/mlZyN803GZJy5JpXMvJkPzcX3IjxuZEF1So5OPhmlLHytzC8zVUKZurJ4O6kXGR5l9GcsSX78lqEVJb/GkeSTJ0tuE5eYnuJtHA7hMG4WPHEkNiDqeDQYsS4s73oxfJqFjCcJe4hSFo3B03b1jHX7NAOZxdI0RNLE7XtkNAM5NbVSYeRFk+8obHchw7ijjG3uacCq2l1UJQOMhiOCv8dHIyU/Tbbwe03H80HKxv87RV8HmVnC/qJv5WCiY1qOKHFR7zsyqiDjo+g3nE6tWtnhgxGVIYw4PhPyLVdbYcsgs4+kKHmNRlSbfGlrNL+l/4uQoc4BRIfTnXEW0VP+253Jrc5plDit7tvWdX2Q7ZKzT8k+JdulQLv26RUx+QY546YmEXPhtwAAAABJRU5ErkJggg==\" width=\"20.5\" height=\"18.5\" style=\"width: 20.5px; height: 18.5px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e), MB (\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAAlCAYAAADfosCNAAADNElEQVRYR+3XW6inYxQG8N+EIiFSpkZcSZIL4UJIczEXGjnlxpkcc8wQI8k45XymSELMOEaIC6EohVJKEjdckHAh5JBD9Gi90+frf9p7vj21s9/aF/v71vt+z/usZz1r/ZdZBGvZIsBoCeRQWfrfMrkPLsQh2Bqv42581GN2J6zBbvgGK3ALPuxnYGgmD8KdeBKf4QQch/dwGj4pALvgQXyFy/BLxa2ruHe6QIcEuS1uL4Bv1Ue2xFpch6twQz2/GJfiKLxfz3bG4/gWF+DHBnRIkHviaNyGPztM7IeX8RICLpcJmFzgeHxXsVvUZU7tgZ9oQTnkYJyCAxEQYSgf3ICve9pJfP5+6z3PvqfxarF5AF6rZxdVqtuWk/FYaTWy+XeNYzKiTorOHWMjn+IsvD2DzTQmz8fzOAIvlibD7K+dM6LhJ0rXkcnv40A2HR2LO/Am/sC+OA+H16ER94n4YgrQ0wvYmaW3BuTGYvavzv6RFxjF5P64tVhs1djOiZ5iE43hM/DwBJDLcS/uK6kkdBLIVSWFVP5Glvsg8/+V+Bzrx3x8bzyLvfppGaHR+OCXVfF/1/tNTvcOuAY3jyiMhmE73I+TxuiqySj+uGtJZlS1v4JNKpxJMtumGDy7LpRLNZbavkNxZGnu595hzQ/7FpQsXl2VfRg2Gvp8fLLLZIDE/7ordhWTvh4/dV5Enym6R5BKv7znhzt29J1i+36aBU1icvfyybSy+FrXL6PTh/Bux6RzVow6vTxG/wZaW/y42EuFpxHchLhA61gTfXISyGPwaPnkU53A6O8BrB6z+QV0GQqzlxTgDBi5fCwvff4/8plrupOS2ENaWQaDvt5m8Pa5h8wFZGIzgq1Eiia33yxrLiBTsRmlYuR9k19QsLOCTEGkjV2xuQE2053GQgOYgeODacEL8X4ak3uULWT8HzfxbFXV2O0qg2KdBLJZwj193+ogSNc4B2lx6fcLssaBzI+iu/BMjWqjPr59+V6M+Fp0R65BwY4C2bpBWt60lW7T/Z0yLX5e7/sgw05mv0w4s6znkJnyh1mC5xszrXDme+6g+5ZADkXnEpNLTA7FwFDnLApN/gPDFrEmYO82LQAAAABJRU5ErkJggg==\" width=\"20.5\" height=\"18.5\" style=\"width: 20.5px; height: 18.5px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e), GB (\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAAlCAYAAADfosCNAAADN0lEQVRYR+3XWch2YxQG4OvPlDlTRIYTSaKUA0okISVTSmY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"18.5\" style=\"width: 20.5px; height: 18.5px;\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e) rounded to 2 decimal places. There must be at least a non-zero integer value to display it in some units, you should always use the greatest unit possible, and data cannot be stored in less than 1 byte (8 bits).\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 41.6px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 20.8px; text-align: left; transform-origin: 384px 20.8px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eNote-1\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e: The range of \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Hearing_range\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003ehuman hearing\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e is 20 to 20,000 Hz, and unsurprisingly, audio sampling rate is usally greater than 40,000 Hz (\u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Nyquist_rate\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eNyquist rate\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e).\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 62.4px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 31.2px; text-align: left; transform-origin: 384px 31.2px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-weight: 700; \"\u003eNote-2\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e: Audio files do not need to be necessarily wholly loaded into the RAM; they only require that a certain amount of bytes per second be always available in it (their bitrate). However, loading full audio files into RAM for playing is the best option to guarantee a smooth sound (without lag). \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-style: italic; font-weight: 700; \"\u003eNext:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003ca target='_blank' href = \"https://www.mathworks.com/matlabcentral/cody/problems/46913-how-many-bytes-an-image-requires-from-ram\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"\"\u003eHow many bytes an image requires from RAM? (Problem 46913)\u003c/span\u003e\u003c/span\u003e\u003c/a\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"font-style: italic; \"\u003eHow many bytes a video requires from RAM?\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function y = audio_size(t,s,c,d,b)\r\n  y = t/s/c/d; % or t/b?\r\nend","test_suite":"%% anti-hacking\r\n\r\nfiletext = fileread('audio_size.m');\r\nassert(~contains(filetext, 'eval'),       'eval is forbidden.');\r\nassert(~contains(filetext, 'fopen'),      'fopen is forbidden.');\r\nassert(~contains(filetext, 'regexp'),     'regexp is forbidden.');\r\nassert(~contains(filetext, '!'),          'Shell commands are forbidden.');\r\nassert(~contains(filetext, 'mlock'),      'mlock is forbidden.');\r\nassert(~contains(filetext, 'munlock'),    'munlock is forbidden.');\r\n\r\n%%case 1. The Song of the White Wolf - Sonya Belousova - The Witcher (55)\r\nt = '3m45s'; \r\ns = 44100;\r\nc = 5;\r\nd = 32;\r\nassert(strcmp(audio_size(t,s,c,d,[]), '189.26 MB'));\r\n\r\n%%case 2. Overture - Gerard Marino - God of War III Original V(001)\r\nt = '3m36s';\r\nb = 9216;\r\nassert(strcmp(audio_size(t,[],[],[],b), '237.30 MB'));\r\n\r\n%%case 3. Rip \u0026 Tear - Mick Gordon - Doom (Original Game Soundtra(002)\r\nt = '4m17s'; \r\ns = 384000;\r\nc = 7;\r\nd = 24;\r\nassert(strcmp(audio_size(t,s,c,d,[]), '1.93 GB'));\r\n\r\n%%case 4. Live Free or Die - Volturnus - Audiomachine\r\nt = '3m13s';\r\nb = 1411;\r\nassert(strcmp(audio_size(t,[],[],[],b), '32.46 MB'));\r\n\r\n%%case 5. Bury the Light - Vergil's battle theme from Devil May Cry 5 Special Edition\r\nt = '9m42s';\r\nb = 132;\r\nassert(strcmp(audio_size(t,[],[],[],b), '9.16 MB'));\r\n\r\n%%case 6. Rob The Frontier - UVERworld - Nanatsu no Taizai Season 3 Opening V2\r\nt = '1m30s'; \r\ns = 22050;\r\nc = 2;\r\nd = 16;\r\nassert(strcmp(audio_size(t,s,c,d,[]), '7.57 MB'));\r\n\r\n%%case 7. Ich Will - Rammstein\r\nt = '3m37s'; \r\ns = 384000;\r\nc = 2;\r\nd = 16;\r\nassert(strcmp(audio_size(t,s,c,d,[]), '317.87 MB'));\r\n\r\n%%case 8. Ratamahatta - Sepultura \r\nt = '4m30s'; \r\ns = 92000;\r\nc = 2;\r\nd = 24;\r\nassert(strcmp(audio_size(t,s,c,d,[]), '142.14 MB'));\r\n\r\n%%case 9. Dark Crow - Man with a Mission\r\nt = '4m38s';\r\nb = 9216;\r\nassert(strcmp(audio_size(t,[],[],[],b), '305.42 MB'));\r\n\r\n%%case 10. On Our Own - Bobby Brown\r\nt = '4m54s';\r\ns = 22050;\r\nc = 1;\r\nd = 8;\r\nassert(strcmp(audio_size(t,s,c,d,[]), '6.18 MB'));\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":1,"created_by":443343,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":9,"test_suite_updated_at":"2020-10-26T22:59:29.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2020-10-20T20:01:52.000Z","updated_at":"2025-12-07T20:40:07.000Z","published_at":"2020-10-26T20:08:12.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eAudio files, as many other files are stored compressed in our computers: MP3, OGG, or M4A, are all different types of compressed audio files. Audio must be first decompressed to its total size before it can be played: hearing compressed audio is utterly incomprehensible to humans. Your task is to compute its full length.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWe may calculate an audio size in bits with the following formula: \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ey = t*s*c*\\\\delta\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e, in which \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003et\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e is its duration in minutes/seconds, \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003es\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e is its sample rate in hertz (Hz), \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ec\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e is its number of channels, and \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e\\\\delta\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e is its bit depth, the number of bits used to store audio intensity. Usually, an audio file's duration is easily obtained from any software, but the other parameters are not always available. Sometimes the bitrate is presented instead, which is defined as \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003eb = s*c*\\\\delta\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e and is given as kbps \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e(kilobits per second)\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e. Bit rate is used as a measure of quality for digital streamming:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[Digital Walkie-talkies have a bitrate of 16kbps.\\nOn-line AM radio has a bitrate of 32kbps.\\nOn-line FM radio has a bitrate of 96kbps.\\nCD audio has a bitrate of 1,411 kbps.\\nHD audio may have a bitrate up to 9,216 kbps. (over 24 bit-depth, and 44 kHz sample rate)]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eCompute how many bytes an image requires from RAM, given its duration (d) and bitrate (b) or sample rate (s), number of channels (c) and  bit depth \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e\\\\delta\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e. \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003eMoreover, make the results more human-readable by showing them with units: bytes (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e2^{0}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e), KB (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e2^{10}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e), MB (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e2^{20}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e), GB (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e2^{30}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e) rounded to 2 decimal places. There must be at least a non-zero integer value to display it in some units, you should always use the greatest unit possible, and data cannot be stored in less than 1 byte (8 bits).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eNote-1\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e: The range of \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://en.wikipedia.org/wiki/Hearing_range\\\"\u003e\u003cw:r\u003e\u003cw:t\u003ehuman hearing\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is 20 to 20,000 Hz, and unsurprisingly, audio sampling rate is usally greater than 40,000 Hz (\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://en.wikipedia.org/wiki/Nyquist_rate\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eNyquist rate\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eNote-2\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e: Audio files do not need to be necessarily wholly loaded into the RAM; they only require that a certain amount of bytes per second be always available in it (their bitrate). However, loading full audio files into RAM for playing is the best option to guarantee a smooth sound (without lag). \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eNext:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:hyperlink w:docLocation=\\\"https://www.mathworks.com/matlabcentral/cody/problems/46913-how-many-bytes-an-image-requires-from-ram\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eHow many bytes an image requires from RAM? (Problem 46913)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eHow many bytes a video requires from RAM?\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"}],"term":"tag:\"bits2bytes\"","current_player_id":null,"fields":[{"name":"page","type":"integer","callback":null,"default":1,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"per_page","type":"integer","callback":null,"default":50,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"sort","type":"string","callback":null,"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"body","type":"text","callback":null,"default":"*:*","directive":null,"facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":false},{"name":"group","type":"string","callback":null,"default":null,"directive":"group","facet":true,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"difficulty_rating_bin","type":"string","callback":null,"default":null,"directive":"difficulty_rating_bin","facet":true,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"id","type":"integer","callback":null,"default":null,"directive":"id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"tag","type":"string","callback":null,"default":null,"directive":"tag","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"product","type":"string","callback":null,"default":null,"directive":"product","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"created_at","type":"timeframe","callback":{},"default":null,"directive":"created_at","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"profile_id","type":"integer","callback":null,"default":null,"directive":"author_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"created_by","type":"string","callback":null,"default":null,"directive":"author","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"player_id","type":"integer","callback":null,"default":null,"directive":"solver_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"player","type":"string","callback":null,"default":null,"directive":"solver","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"solvers_count","type":"integer","callback":null,"default":null,"directive":"solvers_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"comments_count","type":"integer","callback":null,"default":null,"directive":"comments_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"likes_count","type":"integer","callback":null,"default":null,"directive":"likes_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"leader_id","type":"integer","callback":null,"default":null,"directive":"leader_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"leading_solution","type":"integer","callback":null,"default":null,"directive":"leading_solution","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true}],"filters":[{"name":"asset_type","type":"string","callback":null,"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":"\"cody:problem\"","prepend":true},{"name":"profile_id","type":"integer","callback":{},"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":"author_id","static":null,"prepend":true}],"query":{"params":{"per_page":50,"term":"tag:\"bits2bytes\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"bits2bytes\"","","\"","bits2bytes","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f1048781a40\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f10487819a0\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f10487810e0\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f1048781cc0\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f1048781c20\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f1048781b80\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f1048781ae0\u003e":"tag:\"bits2bytes\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f1048781ae0\u003e":"tag:\"bits2bytes\""},"queried_facets":{}},"query_backend":{"connection":{"configuration":{"index_url":"http://index-op-v2/solr/","query_url":"http://search-op-v2/solr/","direct_access_index_urls":["http://index-op-v2/solr/"],"direct_access_query_urls":["http://search-op-v2/solr/"],"timeout":10,"vhost":"search","exchange":"search.topic","heartbeat":30,"pre_index_mode":false,"host":"rabbitmq-eks","port":5672,"username":"search","password":"J3bGPZzQ7asjJcCk","virtual_host":"search","indexer":"amqp","http_logging":"true","core":"cody"},"query_connection":{"uri":"http://search-op-v2/solr/cody/","proxy":null,"connection":{"parallel_manager":null,"headers":{"User-Agent":"Faraday v1.0.1"},"params":{},"options":{"params_encoder":"Faraday::FlatParamsEncoder","proxy":null,"bind":null,"timeout":null,"open_timeout":null,"read_timeout":null,"write_timeout":null,"boundary":null,"oauth":null,"context":null,"on_data":null},"ssl":{"verify":true,"ca_file":null,"ca_path":null,"verify_mode":null,"cert_store":null,"client_cert":null,"client_key":null,"certificate":null,"private_key":null,"verify_depth":null,"version":null,"min_version":null,"max_version":null},"default_parallel_manager":null,"builder":{"adapter":{"name":"Faraday::Adapter::NetHttp","args":[],"block":null},"handlers":[{"name":"Faraday::Response::RaiseError","args":[],"block":null}],"app":{"app":{"ssl_cert_store":{"verify_callback":null,"error":null,"error_string":null,"chain":null,"time":null},"app":{},"connection_options":{},"config_block":null}}},"url_prefix":"http://search-op-v2/solr/cody/","manual_proxy":false,"proxy":null},"update_format":"RSolr::JSON::Generator","update_path":"update","options":{"url":"http://search-op-v2/solr/cody"}}},"query":{"params":{"per_page":50,"term":"tag:\"bits2bytes\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"bits2bytes\"","","\"","bits2bytes","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f1048781a40\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f10487819a0\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f10487810e0\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f1048781cc0\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f1048781c20\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f1048781b80\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f1048781ae0\u003e":"tag:\"bits2bytes\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f1048781ae0\u003e":"tag:\"bits2bytes\""},"queried_facets":{}},"options":{"fields":["id","difficulty_rating"]},"join":" "},"results":[{"id":46913,"difficulty_rating":"easy"},{"id":46973,"difficulty_rating":"easy-medium"}]}}