結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー fal_rndfal_rnd
提出日時 2016-10-26 11:17:24
言語 Java21
(openjdk 21)
結果
AC  
実行時間 134 ms / 5,000 ms
コード長 420 bytes
コンパイル時間 1,853 ms
コンパイル使用メモリ 74,280 KB
実行使用メモリ 54,332 KB
最終ジャッジ日時 2024-05-03 06:07:09
合計ジャッジ時間 2,803 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 107 ms
52,664 KB
testcase_01 AC 118 ms
54,020 KB
testcase_02 AC 120 ms
54,052 KB
testcase_03 AC 134 ms
54,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class A
{
	public static final Scanner scanner = new Scanner(System.in);
	public static void main (String[] args) throws java.lang.Exception
	{
		int input = scanner.nextInt();
		for(int i=1; i<=input; i++){
			String o = String.valueOf(i);
			if(i%3==0){
				System.out.print("Fizz");
				o = "";
			}
			if(i%5==0){
				System.out.print("Buzz");
				o = "";
			}
			System.out.println(o);
		}
	}
}
0