Given a number n, return the sound of a burp with n letters r: "bu", then n letters r, then "p".
Example 1:
Input: n = 4 Output: "burrrrp" Explanation: "bu", then 4 letters r, then "p". That's the burp in this lesson's title.
Example 2:
Input: n = 1 Output: "burp" Explanation: The shortest burp has a single r.
Example 3:
Input: n = 7 Output: "burrrrrrrp" Explanation: "bu", then 7 letters r, then "p".
Constraints:
nis a whole number from 1 to 20.- The result is all lowercase.
Free plan: 30 tutor messages. Premium is unlimited.
Saved
Ctrl + Enter to check
