Submission
Status:
PPPPPPPPPP
Score: 100
User: amongus
Problemset: ผลรวมตัวเลข
Language: cpp
Time: 0.002 second
Submitted On: 2024-10-15 18:14:57
#include<stdio.h>
int main(){
int n;
int m;
scanf("%d %d",&n,&m);
int t=0;
for(int i=n;i<m;i=i+1){
if(i%2==0||i%3==0){
t=t+i;
}
}
printf("%d",t);
}