結果

問題 No.378 名声値を稼ごう
ユーザー sougo002sougo002
提出日時 2016-06-30 23:34:05
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 412 bytes
コンパイル時間 2,896 ms
コンパイル使用メモリ 74,432 KB
実行使用メモリ 56,044 KB
最終ジャッジ日時 2024-04-20 04:58:08
合計ジャッジ時間 4,159 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 107 ms
53,096 KB
testcase_02 AC 116 ms
53,832 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 AC 105 ms
53,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class TGMain {
    
    public static void main(String[] args){
        int a, b, c, N;
        boolean Flg = false;
        int ans = 0;
        Scanner sc = new Scanner(System.in);
        N = sc.nextInt();
        int max = N+N;
        while(N != 0){
            
            ans += N;
            N /= 2;
            
        }
        System.out.println(max - ans);
    }
}
0