Problem Description
文文小學時因交友不慎,學會了說髒話。有一天他說髒話時被老師聽到了,結果被罰在黑板上寫 n 遍「I don't say swear words!」
Input Format
輸入只有一行,其中含有一個正整數 n,代表文文被罰寫的次數。
Output Format
輸出 n 行「I don't say swear words!」
Sample Input
2
Sample Output
I don't say swear words!
I don't say swear words!
-----*Problem from【ZeroJudge, An Online Judge System For Beginners】
My Answer
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. |
#include<iostream> using namespace std; int main(void) { int n; while(cin>>n){ for(int i=0; i<n; ++i){ cout<<"I don't say swear words!"<<endl; } } return 0; } |
全站熱搜