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

11230번 - Zig Zag Nametag 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 256 MB71383050.847%

문제

When ninjas go to conferences they wear fake nametags. One ninja in particular wants to impress his Sensei. His Sensei chooses a new favorite number every day. The pupil wants to put a name on his nametag that encodes his Sensei’s favorite number! This name will consist of only lower case letters. He assigns a value to each letter, based on its position in the alphabet (e.g. a = 1, b = 2, ..., z = 26). Then, he encodes the Sensei’s number by adding up the absolute values of the differences of every consecutive pair of letters. For example, the string azxb has the value of:

|a − z| + |z − x| + |x − b| = |1 − 26| + |26 − 24| + |24 − 2| = 49

The name that the ninja will write on his nametag is the shortest string that encodes to his Sensei’s favorite number. If there’s more than one string of the shortest length, he’ll choose the one that comes first alphabetically. Given the Sensei’s favorite number, k, find the string that the ninja should put on his nametag.

입력

Each input will consist of a single test case. Note that your program may be run multiple times on different inputs. Each input consists of a single line with a single integer k (1 ≤ k ≤ 1 000 000), which is the Sensei’s favorite number. There will always be a name that encodes to the Sensei’s number.

출력

Output a single line with a string of lower case letters, which is the name that the ninja should put on the nametag to impress the Sensei.

제한

예제 입력 1

1

예제 출력 1

ab

예제 입력 2

19

예제 출력 2

at

예제 입력 3

77

예제 출력 3

aoazb

힌트

출처

University > North American Invitational Programming Contest > NAIPC 2015 J번

Contest > Open Cup > 2014/2015 Season > Stage 12: Grand Prix of America J번

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

출처

대학교 대회

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

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