| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 84988 | sh25_wanghy | 数位和为偶数的数 | C++ | 通过 | 0 MS | 252 KB | 275 | 2026-03-05 20:02:22 |
#include<iostream> using namespace std; bool iseven(int n){ int s=0; while(n){ s+=n%10; n=n/10; } return s%2==0; } int main(){ int i; cin>>i; for(int u=1;u<=i;++u) if(iseven(u)) cout<<u<<" "; return 0; }