Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
136155 陈家宝 魔法生物 C++ 通过 100 0 MS 260 KB 231 2024-03-08 13:11:00

Tests(1/1):


#include<bits/stdc++.h> using namespace std; const int N =1e5+10,INF =0x3f3f3f3f; int n; int main () { while(cin>>n && n!=0){ long long c=pow(2,n-1); if(n!=1)cout<<c%n+1<<endl; else cout<<0<<'\n'; } return 0; }


测评信息: