結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー taketake
提出日時 2016-07-10 13:50:52
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 606 bytes
コンパイル時間 2,765 ms
コンパイル使用メモリ 74,520 KB
実行使用メモリ 41,620 KB
最終ジャッジ日時 2024-04-21 11:45:18
合計ジャッジ時間 3,570 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		



        Scanner sc = new Scanner(System.in);

        // int 読み込む
        int a = sc.nextInt();

	String ans = "";


	if (a % 3 == 0) {
		ans="Fizz";
	}

	if (a % 5 == 0) {
		ans="Buzz";
	}
		
	if ((a % 5 == 0) && (a % 3 == 0)) {
		ans="FizzBuzz";
	}

        // 書き出す。
        System.out.println(ans);




		
	}
}
0