ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1893. A380

WA16 pascal
Posted by grdaria 23 Feb 2017 14:59
whats wrong?

program fly;
const okn='window';
      ser='neither';
      proh='aisle';
var i,r,n,bb:integer;
    s,s1:string;
    m:char;
begin
readln(s);
n:=length(s);
m:=s[n];
s1:=s;
delete(s1,n,1);
val(s1,r,bb);
if r<3 then
 if (m='A') or (m='D') then writeln(okn) else writeln(proh) else
if r<21 then
 if (m='A') or (m='F') then writeln(okn) else writeln(proh) else
if r<65 then
if (m='A') or (m='K') then writeln(okn) else
if (m='C') or (m='D') or (m='G') or (m='H') then writeln(proh) else writeln(ser);
end.