Image File Size Calculator

Write a function image_size_bytes(width, height, colour_depth) that returns the uncompressed file size, in bytes, of a bitmap image with the given width and height (in pixels) and colour depth (in bits per pixel).

Read width, height and colour_depth as integers, one per line, and print the result.

Example: input 100, 100, 24 → output 30000.

main.py
Loading editor…

Console

Run your code to see output here.