Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
127158 罗恩祥 魔法生物 C++ 通过 100 0 MS 264 KB 241 2024-01-25 08:07:37

Tests(1/1):


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


测评信息: