結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー kuuso1
提出日時 2016-06-11 13:45:33
言語 Java
(openjdk 23)
結果
AC  
実行時間 56 ms / 5,000 ms
コード長 598 bytes
コンパイル時間 2,080 ms
コンパイル使用メモリ 74,372 KB
実行使用メモリ 50,184 KB
最終ジャッジ日時 2024-10-09 12:52:01
合計ジャッジ時間 2,734 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

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
	{
		// your code goes here
		DataInputStream d = new DataInputStream(System.in);
		String ss = d.readLine();
		int N = Integer.parseInt(ss);
		for(int i=1;i<=N;i++){
			String s = Integer.toString(i);
			if(i % 3 == 0) s = "Fizz";
			if(i % 5 == 0) s = "Buzz";
			if(i % 15 == 0) s = "FizzBuzz";
			System.out.println(s);
		}
	}
}
0