시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 (추가 시간 없음) | 1024 MB | 158 | 77 | 62 | 45.588% |
Justin likes to play a game called "Weight of Words." In this game, a player must find words of a given length and a given weight. The weight of a word is the sum of the weights of its letters. Letters are English lowercase characters from 'a' to 'z' and have weights from $1 \ldots 26$.
You are asked to write an AI that can play this game!
The input consists of a single line with two integers $l$ ($0 < l \le 40$) and $w$ ($0 < w \le 1000$).
Output a string of length $l$ with weight $w$ consisting of lowercase English letters if it exists, otherwise output impossible
. If more than one string exists, you may output any of them.
11 131
programming
7 96
contest
26 677
impossible
High School > Virginia Tech High School Programming Contest > 2017 Virginia Tech High School Programming Contest F번