結果

問題 No.378 名声値を稼ごう
ユーザー shinwisteriashinwisteria
提出日時 2017-04-01 22:54:40
言語 Java19
(openjdk 21)
結果
AC  
実行時間 128 ms / 2,000 ms
コード長 342 bytes
コンパイル時間 4,584 ms
コンパイル使用メモリ 72,660 KB
実行使用メモリ 56,156 KB
最終ジャッジ日時 2023-09-12 12:41:08
合計ジャッジ時間 5,782 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,744 KB
testcase_01 AC 126 ms
55,592 KB
testcase_02 AC 127 ms
55,844 KB
testcase_03 AC 128 ms
56,156 KB
testcase_04 AC 127 ms
55,804 KB
testcase_05 AC 127 ms
55,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Meiseichi {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner s = new Scanner(System.in);
		long N = s.nextLong();
		s.close();
		long copy = N;
		long sum = 0;
		while(N != 0){
			N /= 2;
			sum += N;
		}
		System.out.println(copy-sum);

	}

}
0