Green or Blue?

Geometry Level 3

In this regular heptagon, which color covers the most area: The green region or the blue region?

Blue Both of them are equal Green

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Piotr Idzik
Mar 17, 2021

Please do not treat this solution too serious. @Fletcher Mattox best regards!

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"""
not so serious solution of:
    https://brilliant.org/problems/green-or-blue/?ref_id=1613431
"""
import urllib.request
import PIL.Image


def get_image(image_url):
    """
    returns the image from image_url
    """
    return PIL.Image.open(urllib.request.urlopen(image_url)).convert('RGB')


def get_color_num_dict(in_image):
    """
    returns a dictionary with number of pixels in given color data
    res[color] = number of pixels in color
    """
    return {key: num for (num, key)
            in in_image.getcolors(in_image.size[0]*in_image.size[1])}


IMAGE_URL = \
    'https://ds055uzetaobb.cloudfront.net/brioche/uploads/Hu6ebybcDY-green-or-blue_.png'


GREEN_COL = (0, 204, 0)
BLUE_COL = (0, 0, 255)
COLOR_NUM_DICT = get_color_num_dict(get_image(IMAGE_URL))


print(f"number of blue pixels: {COLOR_NUM_DICT[BLUE_COL]}")
print(f"number of green pixels: {COLOR_NUM_DICT[GREEN_COL]}")

I absolutely love it, Piotr! Best solution I've seen on all of Brilliant. Ever.

Fletcher Mattox - 2 months, 3 weeks ago
Jason Gomez
Mar 15, 2021

Just as Percy said

They are always equal

Now knowing to combat this principle the answer won’t be them being equal, so at a 50-50 you can get it right


The Actual Method (to be hopefully completed)

@Fletcher Mattox @Saya Suka How do I proceed from here(I need to find the ratio between a a and b b or need to show b < a 8 b<a\sqrt8 )

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...