結果

問題 No.1184 Hà Nội
ユーザー cpcznksutbeoacpcznksutbeoa
提出日時 2020-08-22 14:56:35
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,121 bytes
コンパイル時間 1,282 ms
コンパイル使用メモリ 119,036 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-23 09:21:01
合計ジャッジ時間 2,422 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 2 ms
5,376 KB
testcase_12 AC 2 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 2 ms
5,376 KB
testcase_20 AC 2 ms
5,376 KB
testcase_21 AC 2 ms
5,376 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 2 ms
5,376 KB
testcase_28 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <bitset>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <cctype>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <limits>
#include <map>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
int mod = 998244353;
using namespace std;
#define int long long
signed main() {
    long long N, L; cin >> N >> L;
    long long count = (N + L - 1) / L;
    long long ans = 1;
    vector<long long>A(32);
    A[0] = 2;
    for (long long i = 1; i < 32; i++) {
        A[i] = A[i - 1] * A[i - 1];
        A[i] %= mod;
    }
    for (long long i = 1; i < 32; i++) {
        if (count & (1 << i)) {
            ans *= A[i]; ans %= mod;
        }
    }
    ans--;
    cout << ans << endl;
}
0