Submission
Status:
PPPPPPPPPP
Subtask/Task Score:
100/100
Score: 100
User: Prap
Problemset: ผลรวมตัวเลข
Language: c
Time: 0.002 second
Submitted On: 2025-09-30 21:11:20
#include <stdio.h>
#include <string.h>
int main() {
int start,end;
scanf("%d" , &start);
scanf("%d" , &end);
int count;
count = 0;
int numbas = end - start + 1;
for (int i = 0; i<numbas-1; i++ ) {
if ((start + i)%2==0 || (start+i)%3==0 ) {
count = count + start + i;
}
}
printf("%d",count);
}