結果
問題 | No.9002 FizzBuzz(テスト用) |
ユーザー | jimano |
提出日時 | 2015-10-11 16:32:16 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 576 bytes |
コンパイル時間 | 3,492 ms |
コンパイル使用メモリ | 73,052 KB |
実行使用メモリ | 56,180 KB |
最終ジャッジ日時 | 2023-09-28 11:45:35 |
合計ジャッジ時間 | 4,342 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 123 ms
56,132 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
ソースコード
import java.util.Scanner; public class No9002 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); final String f = "Fizz"; final String b = "Buzz"; final String fb = f+b; for(int i = 1; i < a + 1; i++){ if(i % 15 == 0){ System.out.println(fb); if (i % 3 == 0){ System.out.println(f); }else if (i % 5 == 0){ System.out.println(b); } } System.out.println(i); } } }