Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
46480 | 徐若宸 | 数位和为偶数的数 | C++ | Wrong Answer | 0 MS | 256 KB | 257 | 2024-05-04 09:28:16 |
#include <bits/stdc++.h> using namespace std; bool cmp(int n){ int sum=0; while(n){ sum+=n%10; n/=10; } if(sum%2==0)return 1; return 0; } int main(){ int n; cin>>n; for(int i=2;i<n;i++){ if(cmp(i)){ cout<<i<<" "; } } }