Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
46685 老方 数位和为偶数的数 C++ 通过 1 MS 240 KB 206 2024-05-05 09:11:28

Tests(1/1):


#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; for(int i=1;i<=n;i++){ int t=i,s=0; while(t){ s+=t%10; t/=10; } if(s%2==0)cout<<i<<' '; } return 0; }


测评信息: