結果

問題 No.311 z in FizzBuzzString
ユーザー koukonkokoukonko
提出日時 2015-12-10 18:33:05
言語 Java21
(openjdk 21)
結果
AC  
実行時間 60 ms / 1,500 ms
コード長 718 bytes
コンパイル時間 2,132 ms
コンパイル使用メモリ 76,112 KB
実行使用メモリ 53,680 KB
最終ジャッジ日時 2023-10-25 02:38:10
合計ジャッジ時間 3,340 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
53,672 KB
testcase_01 AC 53 ms
53,680 KB
testcase_02 AC 54 ms
52,652 KB
testcase_03 AC 54 ms
53,672 KB
testcase_04 AC 52 ms
53,652 KB
testcase_05 AC 52 ms
53,644 KB
testcase_06 AC 54 ms
53,648 KB
testcase_07 AC 53 ms
53,644 KB
testcase_08 AC 57 ms
53,652 KB
testcase_09 AC 56 ms
53,656 KB
testcase_10 AC 60 ms
53,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;

public class Main {
	public static void main(String[] args) {
		BufferedReader buff = new BufferedReader(new InputStreamReader(System.in));

		try {

			BigInteger count = new BigInteger(buff.readLine());
			BigInteger ans = new BigInteger("0");

			ans = ans.add(count.divide(new BigInteger("3")));
			ans = ans.add(count.divide(new BigInteger("5")));

			System.out.println(ans.multiply(new BigInteger("" + 2)).toString());

		} catch (NumberFormatException e) {
			e.getStackTrace();
		} catch (IOException e) {
			e.getStackTrace();
		} catch (Exception e) {
			e.getStackTrace();
		}
	}
}
0