Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Question!


Name: abct
Title:
  pascal
Question:
const
  NY: array [Boolean] of String[3] = ('No','Yes');
var
  n: Integer;
  s: String;
begin
  Assign(input,'input.txt'); Reset(input);
  Assign(output,'output.txt'); Rewrite(output);
  ReadLn(n);
  for n:=1 to n do begin
    ReadLn(s);
    WriteLn(NY[(Length(s)=6)
      and ([s[1],s[5],s[6]]<=['A','B','C','E','H','K','M','O','P','T','X','Y'])
      and ([s[2],s[3],s[4]]<=['0'..'9'])]);
  end;
end.
Answers: