• + 0 comments

    Passed all test Cases. import numpy as np

    rgb_col = input().split()

    arr = []

    for item in rgb_col: val = list(map(int, item.split(','))) gray = 0.21*int(val[0]) + 0.72*int(val[1]) + 0.07*int(val[2]) arr.append(gray)

    hist = np.histogram(arr, 255, [0,256], density = True)[0]

    if hist[:100].sum() > 0.50: print('night') else: print('day')