結果

問題 No.9005 実行時間/使用メモリテスト(テスト用)
ユーザー ぴろずぴろず
提出日時 2015-03-27 01:09:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 222 ms / 3,000 ms
コード長 621 bytes
コンパイル時間 2,142 ms
コンパイル使用メモリ 71,660 KB
実行使用メモリ 56,436 KB
最終ジャッジ日時 2023-09-11 10:41:51
合計ジャッジ時間 3,426 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
55,860 KB
testcase_01 AC 130 ms
55,712 KB
testcase_02 AC 129 ms
55,548 KB
testcase_03 AC 138 ms
56,436 KB
testcase_04 AC 222 ms
55,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no174a;

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = 10000 * (int) Math.pow(10, sc.nextInt());
		long sum = 0;
		for(int i=0;i<n;i++) {
			sum += bitCount(n);
		}
		System.out.println(0);
	}
	static int bitCount(int i) {
        i = (i & 0x55555555) + (i >> 1  & 0x55555555);
        i = (i & 0x33333333) + (i >> 2  & 0x33333333);
        i = (i & 0x0f0f0f0f) + (i >> 4  & 0x0f0f0f0f);
        i = (i & 0x00ff00ff) + (i >> 8  & 0x00ff00ff);
        i = (i & 0x0000ffff) + (i >> 16 & 0x0000ffff);
        return i;
	}
}
0