fork download
  1. program color;
  2. var
  3. Y,I,Q:integer;
  4. r1,g1,b1:real;
  5. begin
  6. r1:=255/255;
  7. g1:=140/255;
  8. b1:=0/255;
  9. Y:=Trunc((0.299*r1+0.587*g1+0.114*b1)*255);
  10. I:=Trunc((((0.596*r1-0.275*g1-0.321*b1)+0.596)/1.192)*255);
  11. Q:=Trunc((((0.212*r1-0.523*g1+0.311*b1)+0.523)/1.046)*255);
  12. writeln(Y);
  13. writeln(I);
  14. writeln(Q);
  15. end.
  16.  
  17.  
Success #stdin #stdout 0s 5276KB
stdin
Standard input is empty
stdout
158
222
109