結果

問題 No.593 4進FizzBuzz
ユーザー uafr_csuafr_cs
提出日時 2017-11-10 22:33:36
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 544 bytes
コンパイル時間 1,977 ms
コンパイル使用メモリ 75,240 KB
実行使用メモリ 61,948 KB
最終ジャッジ日時 2024-05-03 12:47:49
合計ジャッジ時間 11,768 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 104 ms
40,036 KB
testcase_01 AC 113 ms
40,756 KB
testcase_02 AC 116 ms
41,016 KB
testcase_03 AC 115 ms
41,144 KB
testcase_04 AC 105 ms
40,160 KB
testcase_05 AC 104 ms
39,992 KB
testcase_06 AC 116 ms
40,992 KB
testcase_07 AC 110 ms
40,572 KB
testcase_08 AC 118 ms
41,124 KB
testcase_09 AC 119 ms
40,908 KB
testcase_10 AC 121 ms
41,108 KB
testcase_11 AC 122 ms
41,084 KB
testcase_12 AC 107 ms
39,904 KB
testcase_13 AC 108 ms
40,104 KB
testcase_14 AC 106 ms
40,072 KB
testcase_15 AC 123 ms
41,012 KB
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
testcase_30 RE -
testcase_31 RE -
testcase_32 RE -
testcase_33 RE -
testcase_34 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.BigInteger;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Scanner;

public class Main {
	
	public static long MOD = 1000000007;
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		final String str = sc.next();
		final long N = Long.parseLong(str, 4);
		
		if(N % 15 == 0){
			System.out.println("FizzBuzz");
		}else if(N % 5 == 0){
			System.out.println("Buzz");
		}else if(N % 3 == 0){
			System.out.println("Fizz");
		}else{
			System.out.println(str);
		}
		
	}
}
0