結果
| 問題 | No.9002 FizzBuzz(テスト用) |
| ユーザー |
fantom_1x
|
| 提出日時 | 2016-04-04 17:00:55 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 32 ms / 5,000 ms |
| + 792µs | |
| コード長 | 603 bytes |
| 記録 | |
| コンパイル時間 | 1,408 ms |
| コンパイル使用メモリ | 84,876 KB |
| 実行使用メモリ | 40,276 KB |
| 最終ジャッジ日時 | 2026-09-09 09:50:08 |
| 合計ジャッジ時間 | 2,532 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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