Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
84014 sh25_shenpy Hanoi双塔问题 C++ 解答错误 0 MS 252 KB 463 2026-02-05 16:08:29

Tests(1/10):


#include <iostream> #include<algorithm> using namespace std; void print_uint128(__int128 num) { if (num == 0) { cout << 0; return; } string s; while (num > 0) { s.push_back('0' + num % 10); num /= 10; } reverse(s.begin(), s.end()); cout << s; } int main() { int n; while(cin >> n){ __int128 result = (static_cast<__int128>(1) << (n + 1)) - 2; print_uint128(result);} return 0; }


测评信息: