Submission

Status:

PPPPPPPPPP

Subtask/Task Score:

100/100

Score: 100

User: NovemNotes

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

Language: cpp

Time: 0.002 second

Submitted On: 2025-09-29 13:45:29

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

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