結果

問題 No.637 X: Yet Another FizzBuzz Problem
ユーザー GchansanjouGchansanjou
提出日時 2018-02-12 02:05:12
言語 Java21
(openjdk 21)
結果
AC  
実行時間 46 ms / 1,000 ms
コード長 821 bytes
コンパイル時間 3,283 ms
コンパイル使用メモリ 72,852 KB
実行使用メモリ 49,536 KB
最終ジャッジ日時 2023-09-11 04:28:56
合計ジャッジ時間 6,062 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
49,124 KB
testcase_01 AC 44 ms
49,196 KB
testcase_02 AC 45 ms
49,132 KB
testcase_03 AC 44 ms
49,136 KB
testcase_04 AC 44 ms
48,948 KB
testcase_05 AC 45 ms
49,092 KB
testcase_06 AC 44 ms
49,080 KB
testcase_07 AC 44 ms
48,848 KB
testcase_08 AC 44 ms
48,952 KB
testcase_09 AC 44 ms
49,124 KB
testcase_10 AC 45 ms
49,128 KB
testcase_11 AC 45 ms
49,536 KB
testcase_12 AC 44 ms
49,168 KB
testcase_13 AC 44 ms
48,840 KB
testcase_14 AC 45 ms
49,212 KB
testcase_15 AC 44 ms
48,940 KB
testcase_16 AC 44 ms
49,272 KB
testcase_17 AC 44 ms
49,192 KB
testcase_18 AC 45 ms
49,220 KB
testcase_19 AC 44 ms
49,384 KB
testcase_20 AC 45 ms
49,108 KB
testcase_21 AC 45 ms
49,060 KB
testcase_22 AC 44 ms
47,216 KB
testcase_23 AC 45 ms
49,088 KB
testcase_24 AC 45 ms
49,196 KB
testcase_25 AC 46 ms
49,240 KB
testcase_26 AC 44 ms
49,188 KB
testcase_27 AC 45 ms
49,080 KB
testcase_28 AC 44 ms
49,188 KB
testcase_29 AC 44 ms
49,372 KB
testcase_30 AC 44 ms
48,844 KB
testcase_31 AC 44 ms
49,144 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukiCoder;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No00637 {

	public static void main(String[] args) {
		BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
		String[] input = new String[5];
		StringBuilder builder = new StringBuilder();

		try {
			input = bufferedReader.readLine().split(" ");

			for(int i = 0 ; i < input.length ; i++) {
				int n =Integer.parseInt(input[i]);
				if (n%3 == 0 && n%5 == 0) {
					builder.append("FizzBuzz");
				} else if (n%5 == 0) {
					builder.append("Buzz");
				} else if (n%3 == 0) {
					builder.append("Fizz");
				} else {
					builder.append(n);
				}
			}
			System.out.println(builder.length());
		} catch (IOException e) {
			e.printStackTrace();
		}

	}

}
0