|
|
1.1 ! root 1: program bench3 ( input , output ) ; ! 2: ! 3: const max = 100 ; ! 4: ! 5: var i , len : integer ; ! 6: inline : packed array [ 1 .. max ] of char ; ! 7: palind : Boolean ; ! 8: begin ! 9: while not eof do begin ! 10: len := 0 ; ! 11: while not eoln do begin ! 12: len := len + 1 ; ! 13: inline [ len ] := input ^ ; ! 14: get ( input ) ! 15: end ; ! 16: readln ; ! 17: while ( len > 1 ) and ( inline [ len ] =' ' ) do len := len - 1 ; ! 18: palind := true ; ! 19: for i := len downto len div 2 do if inline [ i ] <> inline [ len - i + 1 ] then palind := false ; ! 20: for i := 1 to len do write ( inline [ i ] ) ; ! 21: write (' is' ) ; ! 22: if not palind then write (' not' ) ; ! 23: writeln (' a palindrome' ) ; ! 24: end ! 25: end . ! 26: ! 27: 19711 statements executed in 3.90 seconds cpu time.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.