結果
問題 | No.593 4進FizzBuzz |
ユーザー | 夕叢霧香(ゆうむらきりか) |
提出日時 | 2017-11-10 22:30:47 |
言語 | Java21 (openjdk 21) |
結果 |
TLE
|
実行時間 | - |
コード長 | 594 bytes |
コンパイル時間 | 2,380 ms |
コンパイル使用メモリ | 71,936 KB |
実行使用メモリ | 60,568 KB |
最終ジャッジ日時 | 2023-08-16 03:04:37 |
合計ジャッジ時間 | 8,536 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 111 ms
60,568 KB |
testcase_01 | AC | 110 ms
55,976 KB |
testcase_02 | AC | 111 ms
55,960 KB |
testcase_03 | AC | 110 ms
55,972 KB |
testcase_04 | AC | 111 ms
56,204 KB |
testcase_05 | AC | 112 ms
55,792 KB |
testcase_06 | AC | 113 ms
55,628 KB |
testcase_07 | AC | 110 ms
55,928 KB |
testcase_08 | AC | 110 ms
55,928 KB |
testcase_09 | AC | 111 ms
54,420 KB |
testcase_10 | AC | 111 ms
56,168 KB |
testcase_11 | AC | 111 ms
55,616 KB |
testcase_12 | AC | 110 ms
56,240 KB |
testcase_13 | AC | 117 ms
56,164 KB |
testcase_14 | AC | 116 ms
55,604 KB |
testcase_15 | AC | 111 ms
55,772 KB |
testcase_16 | TLE | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
ソースコード
import java.util.*; import java.math.*; class Main { static boolean divide(BigInteger b,int v){ return b.remainder(BigInteger.valueOf(v))==BigInteger.ZERO; } public static void main(String[] args) { Scanner scan = new Scanner(System.in); BigInteger b=new BigInteger(scan.next(),4); if(divide(b,15)) System.out.println("FizzBuzz"); else if(divide(b,3)) System.out.println("Fizz"); else if(divide(b,5)) System.out.println("Buzz"); else System.out.println(b.toString(4)); } }