Biển quảng cáo BIENQC
Code Pascal
program bienqc;
var t1,t2,h,m,s,t,n:longint;
begin
//assign(input,'bienqc.inp');reset(input);
//assign(output,'bienqc.out');rewrite(output);
read(t1,t2,h,m); readln(s);
if (h=18)and(m=0)and(s=0) then write('S')
else if (h=6)and(m=0)and(s=0) then write('T')
else
begin
t:=(h*3600+m*60+s);
t:=t mod(t1+t2);
if t<t1 then write('S') else write('T');
end;
readln;
end.