Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: bananatomyum2

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

Language: cpp

Time: 0.003 second

Submitted On: 2025-09-29 13:44:53

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

int main(){
	ios_base::sync_with_stdio(false);cin.tie(NULL);
	int n,m,re;
	cin >> n >> m;
	re = 0;
	for(int i=n;i<m;i++){
		if(i%2==0 || i%3==0){
			re += i;
		}
	}
	cout << re << "\n";
	return 0;
}