結果
| 問題 | No.9002 FizzBuzz(テスト用) |
| ユーザー |
fantom_1x
|
| 提出日時 | 2016-04-04 17:00:55 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 61 ms / 5,000 ms |
| コード長 | 603 bytes |
| 記録 | |
| コンパイル時間 | 2,058 ms |
| コンパイル使用メモリ | 75,432 KB |
| 実行使用メモリ | 50,620 KB |
| 最終ジャッジ日時 | 2024-10-03 04:12:16 |
| 合計ジャッジ時間 | 2,803 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 |
ソースコード
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
new Main();
}
public Main() throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = br.readLine().trim();
int n = Integer.parseInt(line);
br.close();
for (int i = 1; i <= n; i++) {
String s = "";
if (i % 3 == 0) {
s += "Fizz";
}
if (i % 5 == 0) {
s += "Buzz";
}
if (s.length() > 0) {
System.out.println(s);
} else {
System.out.println(i);
}
}
}
}
fantom_1x