Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
127148 罗恩祥 魔法生物 C++ 解答错误 0 0 MS 264 KB 217 2024-01-25 08:05:24

Tests(0/1):


#include <bits/stdc++.h> using namespace std; int main() { long long n; while(cin >> n && n != 0) { if(n == 1) cout << 0 << endl; long long num = pow(2,n - 1); cout << num % n + 1 << endl; } }


测评信息: