/*
* https://p...content-available-to-author-only...r.net/problem=1
*/
#include <stdio.h>
#define SIZE (1000)
int main(void) {
int list[SIZE] = { 0 };
int sum = 0;
int i;
for (i = 3; i < SIZE; i += 3) ++list[i];
for (i = 5; i < SIZE; i += 5) ++list[i];
for (i = 3; i < SIZE; i += 2) if (list[i]) sum += i;
return 0;
}
LyoKICogaHR0cHM6Ly9wLi4uY29udGVudC1hdmFpbGFibGUtdG8tYXV0aG9yLW9ubHkuLi5yLm5ldC9wcm9ibGVtPTEKICovCiNpbmNsdWRlIDxzdGRpby5oPgojZGVmaW5lIFNJWkUgKDEwMDApCmludCBtYWluKHZvaWQpIHsKCWludCBsaXN0W1NJWkVdID0geyAwIH07CglpbnQgc3VtID0gMDsKCWludCBpOwoJCglmb3IgKGkgPSAzOyBpIDwgU0laRTsgaSArPSAzKSArK2xpc3RbaV07Cglmb3IgKGkgPSA1OyBpIDwgU0laRTsgaSArPSA1KSArK2xpc3RbaV07Cglmb3IgKGkgPSAzOyBpIDwgU0laRTsgaSArPSAyKSBpZiAobGlzdFtpXSkgc3VtICs9IGk7CglwcmludGYoIiVkXG4iLCBzdW0pOwoJCglyZXR1cm4gMDsKfQo=