Logo
(追記) (追記ここまで)

15104번 - Odd Palindrome 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB39726023869.591%

문제

We say that a string is odd if and only if all palindromic substrings of the string have odd length.

Given a string s, determine if it is odd or not.

A substring of a string s is a nonempty sequence of consecutive characters from s. A palindromic substring is a substring that reads the same forwards and backwards.

입력

The input consists of a single line containing the string s (1 ≤ |s| ≤ 100).

It is guaranteed that s consists of lowercase ASCII letters (‘a’–‘z’) only

출력

If s is odd, then print “Odd.” on a single line (without quotation marks). Otherwise, print “Or not.” on a single line (without quotation marks).

제한

예제 입력 1

amanaplanacanalpanama

예제 출력 1

Odd.

예제 입력 2

madamimadam

예제 출력 2

Odd.

예제 입력 3

annamyfriend

예제 출력 3

Or not.

예제 입력 4

nopalindromes

예제 출력 4

Odd.

힌트

출처

ICPC > Regionals > North America > Pacific Northwest Regional > 2017 Pacific Northwest Region Programming Contest > Division 1 A번

ICPC > Regionals > North America > Pacific Northwest Regional > 2017 Pacific Northwest Region Programming Contest > Division 2 N번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /