結果
問題 |
No.9002 FizzBuzz(テスト用)
|
ユーザー |
![]() |
提出日時 | 2018-02-09 01:45:55 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 742 bytes |
コンパイル時間 | 3,007 ms |
コンパイル使用メモリ | 74,732 KB |
実行使用メモリ | 50,456 KB |
最終ジャッジ日時 | 2024-10-01 21:16:30 |
合計ジャッジ時間 | 3,667 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 4 |
ソースコード
package yukiCoder; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No09002 { public static void main(String[] args) { BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in)); try { int input = Integer.parseInt(bufferedReader.readLine()); for (int i = 1 ; i < input ; i++) { if (0 == i%3 && 0 == i%5) { System.out.println("BuzzFizz"); } else if (0 == i%3) { System.out.println("Fizz"); } else if (0 == i%5) { System.out.println("Buzz"); } else { System.out.println(i); } } } catch (NumberFormatException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } }