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

32609번 - Beaking Spackwards 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB60452071.429%

문제

The 42nd meeting of the Fortnightly Palindrome Convention is coming up, and for this special occasion, they want to spend a session admiring a special kind of palindrome-esque words. These words are not necessarily a palindrome by themselves, but they should contain an exact, predetermined number of palindrome substrings. As preparation for the session, your task is to generate these palindrome-esque words.

As an example, consider the second sample input. The output abacaba contains exactly 12ドル$ palindrome substrings: the seven individual letters, two times aba (at the start and at the end), aca, bacab, and abacaba.

입력

The input consists of:

  • One line with an integer $s$ (1ドル\leq s\leq 10^9$), the number of required palindrome substrings.

출력

Output a string that contains exactly $s$ palindrome substrings. This string should have length between 1ドル$ and 10ドル^5$ characters (inclusive) and only consists of English lowercase letters (a-z).

If there are multiple valid solutions, you may output any one of them.

제한

예제 입력 1

6

예제 출력 1

abab

예제 입력 2

12

예제 출력 2

abacaba

힌트

출처

University > Delft University of Technology > Freshmen Programming Contest 2023 B번

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

출처

대학교 대회

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

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