나는 이렇게 학습한다/Algorithm & SQL 405

1114. Exclamation marks series #6: Remove n exclamation marks in the sentence from left to right

Description: Remove n exclamation marks in the sentence from left to right. n is positive integer. Examples remove("Hi!",1) === "Hi" remove("Hi!",100) === "Hi" remove("Hi!!!",1) === "Hi!!" remove("Hi!!!",100) === "Hi" remove("!Hi",1) === "Hi" remove("!Hi!",1) === "Hi!" remove("!Hi!",100) === "Hi" remove("!!!Hi !!hi!!! !hi",1) === "!!Hi !!hi!!! !hi" remove("!!!Hi !!hi!!! !hi",3) === "Hi !!hi!!! !..

1107. I love you, a little , a lot, passionately ... not at all

Who remembers back to their time in the schoolyard, when girls would take a flower and tear its petals, saying each of the following phrases each time a petal was torn: "I love you" "a little" "a lot" "passionately" "madly" "not at all" If there are more than 6 petals, you start over with "I love you" for 7 petals, "a little" for 8 petals and so on. When the last petal was torn there were cries ..