結果

問題 No.378 名声値を稼ごう
ユーザー GoyotanGoyotan
提出日時 2016-06-20 18:18:26
言語 Java21
(openjdk 21)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 311 bytes
コンパイル時間 3,043 ms
コンパイル使用メモリ 71,424 KB
実行使用メモリ 56,156 KB
最終ジャッジ日時 2023-09-12 00:53:35
合計ジャッジ時間 4,325 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
53,952 KB
testcase_01 AC 118 ms
56,016 KB
testcase_02 AC 117 ms
55,872 KB
testcase_03 AC 122 ms
56,156 KB
testcase_04 AC 120 ms
55,884 KB
testcase_05 AC 120 ms
55,924 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class LoL {
	public static void main(String[] args) {
		long k = 0;
		long  l = 0;
		int t = 0;
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		k = N;
		long by = N*2;
		while(k!=0){
			l+=k;
			k = k/2;
		}
		t = (int) ((int)by - l);
		System.out.println(t);
	}
}
0