Submit | All submissions | Best solutions | Back to list |
SPECTRUM - Spectrum of colours |
For a given x-coordinate find the RGB-colour in this spectrum of colours.
Score is source length.
Input
In the first line the number of test cases t<100. Then t lines with a x-coordinate (0<=x<=767).
Output
t lines with a colour #RRGGBB (0x00<=RR,GG,BB<=0xFF).
Example
Input: 3
0
256
767 Output: #FF00FF
#00FFFF
#FF00FE
Added by: | HWK |
Date: | 2011-08-28 |
Time limit: | 1.860s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: SCM qobi |
hide comments
2021-07-01 13:32:55
Last edit: 2022-11-11 16:08:09 |
|
2011-08-31 11:40:59 Jander
I was on holiday for two weeks. And thanks :-), squeezed three more bytes out too. Last edit: 2011-08-31 14:06:50 |
|
2011-08-31 10:09:08 HWK
Oh, Jander is back. :-) Congratulations, good work. |
|
2011-08-29 18:00:19 HWK
@hallvabo: Seems you have to improve your algorithm. ;-) I'm also looking forward to your Bash solution. |