結果

問題 No.1869 Doubling?
ユーザー cologne
提出日時 2022-03-11 21:58:42
言語 C++17(clang)
(17.0.6 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 229 bytes
コンパイル時間 3,797 ms
コンパイル使用メモリ 162,980 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-16 02:14:22
合計ジャッジ時間 36,474 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23 WA * 9 TLE * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main()
{
    int N, M;
    cin >> N >> M;
    long long ans = 0;
    for (int i = 0; i < N; ++i)
    {
        ans += M;
        M = (M + 1) / 2;
    }
    cout << ans << endl;
}
0