Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: cyblox_boi
Problemset: ผลรวมตัวเลข
Language: cpp
Time: 0.003 second
Submitted On: 2025-10-16 10:27:19
#include <iostream>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n, m;
cin >> n >> m;
if (n > m)
{
swap(n, m);
}
int result = 0;
for (int i = n; i < m; i++)
{
if (i % 3 == 0 || i % 2 == 0)
{
result += i;
}
}
cout << result << '\n';
return 0;
}