From e24c932cee68153c1b40925a21444358b4ee522f Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Thu, 19 Jan 2023 02:47:24 -0600 Subject: [PATCH] participation --- participation/0.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 participation/0.py diff --git a/participation/0.py b/participation/0.py new file mode 100644 index 000000000..a1ee0e9 --- /dev/null +++ b/participation/0.py @@ -0,0 +1,12 @@ +# Header +header = "P3 512 512 255" # 14 bytes + +# Black pixels +# Counting leading pixels, every value takes up 2 bytes +black_image_len = len(header) + (2 * 512 * 512) +print(black_image_len) # 524302 + +# White pixels +# Counting leading pixels, every value takes up 4 bytes +white_image_len = len(header) + (4 * 512 * 512) +print(white_image_len) # 1048590