結果

問題 No.381 名声値を稼ごう Extra
ユーザー GrenacheGrenache
提出日時 2016-06-17 23:27:08
言語 Java21
(openjdk 21)
結果
TLE  
実行時間 -
コード長 1,433 bytes
コンパイル時間 4,092 ms
コンパイル使用メモリ 79,144 KB
実行使用メモリ 50,924 KB
最終ジャッジ日時 2024-04-17 23:26:01
合計ジャッジ時間 13,745 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
42,264 KB
testcase_01 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.math.*;
import java.util.*;


public class Main_yukicoder381 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Printer pr = new Printer(System.out);

        String n = sc.next();

        BigInteger bn = new BigInteger(n);

        pr.println(bn.bitCount() % 1_004_535_809);

        pr.close();
        sc.close();
    }

	@SuppressWarnings("unused")
	private static class Scanner {
		BufferedReader br;
		Iterator<String> it;

		Scanner (InputStream in) {
			br = new BufferedReader(new InputStreamReader(in));
		}

		String next() throws RuntimeException  {
			try {
				if (it == null || !it.hasNext()) {
					it = Arrays.asList(br.readLine().split(" ")).iterator();
				}
				return it.next();
			} catch (IOException e) {
				throw new IllegalStateException();
			}
		}

		int nextInt() throws RuntimeException {
			return Integer.parseInt(next());
		}

		long nextLong() throws RuntimeException {
			return Long.parseLong(next());
		}

		float nextFloat() throws RuntimeException {
			return Float.parseFloat(next());
		}

		double nextDouble() throws RuntimeException {
			return Double.parseDouble(next());
		}

		void close() {
			try {
				br.close();
			} catch (IOException e) {
//				throw new IllegalStateException();
			}
		}
	}

	private static class Printer extends PrintWriter {
		Printer(PrintStream out) {
			super(out);
		}
	}
}
0