7 条题解

  • 1
    @ 2026-3-24 23:37:36

    包AC的!

    #include <iostream>
    #include <cmath>
    using namespace std;
    
    //直接使用公式
    long long ji(int n) {
        return (1LL << n) - 1;  // 2^n - 1
    }
    int main() {
        int n;
        cin >> n;
        long long moves = ji(n);
        cout << moves << endl;
        return 0;
    }
    

    信息

    ID
    1776
    时间
    1000ms
    内存
    256MiB
    难度
    3
    标签
    递交数
    103
    已通过
    52
    上传者