結果

問題 No.311 z in FizzBuzzString
ユーザー yagi2
提出日時 2017-04-20 15:08:35
言語 Java
(openjdk 23)
結果
AC  
実行時間 133 ms / 1,500 ms
コード長 442 bytes
コンパイル時間 2,110 ms
コンパイル使用メモリ 74,024 KB
実行使用メモリ 54,312 KB
最終ジャッジ日時 2024-09-24 21:57:14
合計ジャッジ時間 4,261 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

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