2012/03/06

[zerojudge] d498 我不說髒話

題目:https://zerojudge.tw/ShowProblem?problemid=d498
說明:嗯,立意善良的題目。

Java 版
import java.util.Scanner;
 
public class D498 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = Integer.parseInt(in.nextLine());
            for(int a = 1; a <= n; a++){
                System.out.println("I don't say swear words!");
            }
        }
    }
}
Python 版 (2022.09)
for i in range(int(input())):
    print('I don\'t say swear words!')

沒有留言:

張貼留言