1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#include <iostream> int main() { int total = 0; for (int x = 0; x < 1000; x+= 3) { total += x; } for (int y =0; y < 1000; y+= 5) { total += y; } std::cout << total << std::endl; }
1
266333