Back and Forth

면접 대비

시간 제한1초메모리 제한2048 MB

요약
길이가 최대 백만인 문자열 하나를 읽고, 앞뒤가 같은 회문이면 beep, 아니면 boop을 출력한다.
난이도

쉬움10점 중 2점

유형
문자열, 투 포인터, 구현
정답자
아직 제출이 없습니다

문제

Steve has hit the jackpot at his local flea market. He bought a cheap scanner with a special ability: it detects palindrome words! Unfortunately the algorithm that checks the words is broken, thus Steve asked you to write a new algorithm to implement in the scanner and revive it's glory once more.

Remember that a palindrome word is a word that reads the same when reversed: racecar for example is a palindrome.

입력

The input consists of a string s, having length 1≤∣s∣≤10000001 \leq |s| \leq 1000000.

출력

Your program should output "beep" if the string s is a palindrome, "boop" otherwise.

예제3

  1. 예제 1

    입력
    racecar
    
    예상 출력
    beep
    
  2. 예제 2

    입력
    1234564321
    
    예상 출력
    boop
    
  3. 예제 3

    입력
    eeeeeeeeeeeeeeeeeeeeeeeeee
    
    예상 출력
    beep