Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
33726 | 武云帆 | 【S】T1 | C++ | 解答错误 | 30 | 1000 MS | 3164 KB | 408 | 2024-10-20 15:59:51 |
#include<bits/stdc++.h> using namespace std; const int mod=998244353; string s; int main(){ cin>>s; int p=s.size()-1; int n=0,q=1; while(p>=0){ n+=(s[p]-'0')*q; q*=2; p--; } int ans=0; for(int i=0;i<=n;i++){ for(int j=0;j<=n;j++){ if((i|j)==(j^i)) ans++; ans%=mod; } } cout<<ans<<endl; }