| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 44081 | YOYOLEE-李昕颖 | 合数求和 | C++ | Accepted | 0 MS | 252 KB | 229 | 2024-03-27 20:52:30 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,cnt=0; cin>>n; for(int i=4;i<=n;i++){ if(i%2==0||i%3==0||i%5==0||i%7==0){ if(i!=5&&i!=7) cnt+=i; } } cout<<cnt; return 0; }