Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: tl.cpp

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

Language: cpp

Time: 0.002 second

Submitted On: 2026-07-31 23:12:43

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int n, m, sum;

int main() {
    ios::sync_with_stdio(0), cin.tie(0);

    cin >> n >> m;
    for (int i = n; i < m; i++) {
        if (i % 2 == 0 || i % 3 == 0) sum += i;
    }
    cout << sum;
}