Submission
Status:
P----P-P-P
Score: 40
User: exoworldgd
Problemset: ผลรวมตัวเลข
Language: cpp
Time: 0.002 second
Submitted On: 2024-12-14 21:25:45
#include <bits/stdc++.h>
using namespace std;
int main(void) {
int a,b,sum = 0;
cin >> a >> b;
set<int> m;
for (int i = a+1; i < b; i++) if (i % 2 == 0 || i % 3 == 0) m.insert(i);
for (auto i : m) sum += i;
cout << sum;
}