結果

問題 No.311 z in FizzBuzzString
ユーザー yagi2yagi2
提出日時 2017-04-20 15:08:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 1,500 ms
コード長 442 bytes
コンパイル時間 2,105 ms
コンパイル使用メモリ 74,312 KB
実行使用メモリ 57,592 KB
最終ジャッジ日時 2023-10-25 02:50:20
合計ジャッジ時間 4,249 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
57,568 KB
testcase_01 AC 122 ms
57,592 KB
testcase_02 AC 123 ms
57,448 KB
testcase_03 AC 126 ms
57,560 KB
testcase_04 AC 124 ms
57,556 KB
testcase_05 AC 123 ms
57,444 KB
testcase_06 AC 124 ms
57,444 KB
testcase_07 AC 124 ms
57,536 KB
testcase_08 AC 122 ms
57,472 KB
testcase_09 AC 123 ms
57,560 KB
testcase_10 AC 121 ms
57,372 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        BigInteger N = new BigInteger(sc.next());
        // Fizz = 2 buzz = 2  FizzBuzz = 4;
        BigInteger cnt = N.divide(new BigInteger("5"));
        cnt = cnt.add(N.divide(new BigInteger("3")));

        System.out.println(cnt.multiply(new BigInteger("2")));
    }
}
0