結果
問題 | No.311 z in FizzBuzzString |
ユーザー | rf141 |
提出日時 | 2015-12-05 00:10:48 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 339 bytes |
コンパイル時間 | 3,304 ms |
コンパイル使用メモリ | 74,140 KB |
実行使用メモリ | 57,768 KB |
最終ジャッジ日時 | 2023-10-25 02:34:48 |
合計ジャッジ時間 | 5,444 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
ソースコード
import java.util.*; public class FizzBuzzString{ static int fi = 4; static int tf = 2; public static void main(String... args){ Scanner scan = new Scanner(System.in); long n = scan.nextLong(); long res = 0; while(n%3 == 0){ n/=3; res+=tf; } while(n%5 == 0){ n/=5; res+=tf; } System.out.println(res); } }