Rex's English teacher asked him to submit a paragraph written in English. However, unfortunately, there is a word limit.
Given $l$ represents the word limit, and $count$ represents the number of the words in his paragraph
If $ \mid l - count \mid \leq 10 $ , He will be safe.
Otherwise, he will be punished.
For example
The limit is 50 words
Given a paragraph as follows
And after all these things are his, add, I pray, enough of a sense of humor, so that he may always be serious, yet never take himself too seriously. Give him humility, so that he may always remember the simplicity of greatness, the open mind of true wisdom, the meekness of true strength.
extract from A Father's Prayer by General Douglas MacArthur
$l=50, count=53, \mid l-count \mid \leq 10$
Rex will be safe!
Multiple Test Data
Input $l$ in the first line.
Then, input a paragraph.
If $ \mid l - count \mid \leq 10 $ , output "\ Rex is SAFE /"
Otherwise, output "POOR REX!"
20 Now at a time when carbon emissions and our planet's well-being are in the spotlight, can a return to commercial supersonic flight really be sustainable, profitable for airlines and manufacturers, and affordable for passengers? 50 And after all these things are his, add, I pray, enough of a sense of humor, so that he may always be serious, yet never take himself too seriously. Give him humility, so that he may always remember the simplicity of greatness, the open mind of true wisdom, the meekness of true strength.
POOR REX! \ Rex is SAFE /
To avoid disputes, $ count= (number\ of\ spaces)+1 $
編號 | 身分 | 題目 | 主題 | 人氣 | 發表日期 |
沒有發現任何「解題報告」 |