Submission

Status:

-P-P---P--

Subtask/Task Score:

30/100

Score: 30

User: zenta4u

Problemset: ผลรวมตัวเลข

Language: cpp

Time: 0.002 second

Submitted On: 2025-10-01 08:32:40

#include <bits/stdc++.h>
using namespace std;

int main() {
    int x,y;
    cin >> x>>y;
    int ans = 0;
    for (int i = x; i<=y;i++){
        if (i % 2 == 0 || i % 3 == 0) {
            ans +=i;
        }
    }
    cout << ans;
}