Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

BRIGHT - Brightness

Given a color in hexadecimal RGB notation, we define the brightness of a color as the average value of the R-, G- and B-values. The heigher the average value, the brighter the color. Example: The brightness of #A23B0D is (A2+3B+0D)/3 = 4E.

Input

Input consists of less than 100 lines, every line containing one color in RGB notation.

Output

Determine the brightest color and print it. There will always be exactly one brightest color.

Example

Input:
#9E7232
#F9C46D
#E1B11A
#233956
#1CB9C0

Output:
#F9C46D

Added by:numerix
Date:2011-03-30
Time limit:1.580s
Source limit:10000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: SCM qobi
Resource:own problem

hide comments
2014-05-22 17:26:52 Dominique VAILLANT
@Mitch: Bravo! Even recently I re-read carefully my Ruby solution without finding any amelioration. Idem for 'XYZ_SORT'...
2011-06-30 13:20:48 numerix
@hbm: Instead of random data think of some corner cases.
2011-06-21 17:28:18 hbm
@numerix: WA for 5278344, but it has given me the same answer as my accepted solution against 1000 random RGB codes, dozens of times. Can you give me a hint? Thanks.

6/Oct/2011: Finally! I was rather "dim" to miss that edge case for so long.

Last edit: 2011-10-06 17:37:44
2011-04-19 20:33:57 numerix
@512_I: Input ends with EOF and that's the reason for your NZEC. You try to read data after EOF.
2011-04-19 17:57:58 512_I
@numerix : y i got NZEC while my solution working fine on my computer and how input will end?

Last edit: 2011-04-19 18:03:35
2011-04-14 14:11:48 Hallvard Norheim Bø
Python 3 kicks Python 2 :-)
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.