Problem:
 Score : 200 points    Problem Statement Let us define the FizzBuzz sequence  a_1,a_2,... as follows:   If both 3 and 5 divides i , a_i=\mbox{FizzBuzz} .  If the above does not hold but 3 divides i , a_i=\mbox{Fizz} .  If none of the above holds but 5 divides i , a_i=\mbox{Buzz} .  If none of the above holds, a_i=i .   Find the sum of all numbers among the first N terms of the FizzBuzz sequence.      Constraints  1 \leq N \leq 10^6         Input Input is given from Standard Input in the following format:  N       Output Print the sum of all numbers among the first N terms of the FizzBuzz sequence.        Sample Input 1 15      Sample Output 1 60  The first 15 terms of the FizzBuzz sequence are:  1,2,\mbox{Fizz},4,\mbox{Buzz},\mbox{Fizz},7,8,\mbox{Fizz},\mbox{Buzz},11,\mbox{Fizz},13,14,\mbox{FizzBuzz}  Among them, numbers are 1,2,4,7,8,11,13,14 , and the sum of them is 60 .       Sample Input 2 1000000      Sample Output 2 266666333332  Watch out for overflow.

Solution (Python):
N = int(input())

answer = 0

for i in range(1, N + 1):
    if i % 3 != 0 and i % 5 != 0:
        answer = answer + i

print(answer)

Solution (Python):
N = int(input())
total = 0
for n in range(1, N+1):
  if (n % 3 > 0) and (n % 5 > 0):

    total += n
print(total)

Solution (Python):
def readinput():
    n=int(input())
    return n

def main(n):
    ans=0
    for i in range(1,n+1):
        if i%3==0 or i%5==0:
            continue
        else:
            ans+=i
    return ans

if __name__=='__main__':
    n=readinput()
    ans=main(n)
    print(ans)

Solution (Python):
n = int(input())
ans = 0
for i in range(1,n+1):
  if i%3 != 0 and i%5 != 0:
    ans += i
print(ans)

Solution (Python):
N = int(input())
fb_list = []
for i in range(1, N + 1):
  if (i % 5 != 0) and (i % 3 != 0):
    fb_list.append(i)

ans = sum(fb_list)
print(ans)

Solution (Python):
N = int(input())

ls = [i for i in range(1, N+1) if not (i%3==0 or i%5==0)]

print(sum(ls))

Solution (Python):
N=int(input())
ans=0
for i in range(N+1):
  if i%3!=0 and i%5!=0:
    ans+=i
print(ans)

Solution (Python):
n = int(input())
ans = 0
for i in range(1,n+1):
    if(i % 3 != 0 and i % 5 != 0):
        ans += i
print(ans)

Solution (Python):
n=int(input())
a=[0]*(n+1)
for i in range(n+1):
    if i%3==0 or i%5==0:
        a[i]=0
    else:
        a[i]=i
print(sum(a))

Solution (Python):
import sys
def input(): return sys.stdin.readline().rstrip()

N = int(input())

ans = 0
for i in range(N+1):
    if i % 3 != 0 and i % 5 != 0:
        ans += i

print(ans)

Solution (Python):
N = int(input())

result = 0

for i in range(1, N+1):
    if i % 3 == 0 and i % 5 == 0:
        pass
    elif i % 3 == 0:
        pass
    elif i % 5 == 0:
        pass
    else:
        result += i

print(result)

Solution (Python):
n = int(input())
ans = 0
for i in range(1,n+1):
    if i%3 != 0 and i%5 != 0:
        ans += i
print(ans)

Solution (Python):
N = int(input())
ans = []

for i in range(N+1):
    if i % 3 != 0 and i % 5 != 0:
        ans.append(i)

print(sum(ans))

Solution (Python):
N=int(input())
sum=0
for i in range(1,N+1):
    if i%3!=0 and i%5!=0:
        sum+=i
print(sum)

Solution (Python):
N=int(input())
sum=0
for i in range(1,N+1):
    if i%3==0 or i%5==0:
        sum+=0
    else:
        sum+=i
print(sum)

Solution (Python):
n=int(input())
l3 = (n//3)*3
l5= (n//5)*5
l15=(n//15)*15
print(n*(n+1)//2 - (3+l3)*l3//6 - (5+l5)*l5//10 + (15+l15)*l15//30  )

Solution (Python):
n = int(input())
l = []
for i in range(1,n+1) :
    if i%3 != 0 and i%5 != 0 :
        l.append(i)
print(sum(l))

Solution (Python):
import math
from math import gcd,pi,sqrt
INF = float("inf")
MOD = 10**9 + 7

import sys
sys.setrecursionlimit(10**6)
import itertools
import bisect
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]


def main():
    n = i_input()
    sum = 0
    for i in range(1,n+1):
        if i%3 != 0 and i%5 != 0:
            sum += i
    print(sum)



if __name__=="__main__":
    main()

Solution (Python):
n  =int(input())
ans =0
for i in range (1,n+1):
  if i%3 != 0 and i%5 != 0:
    ans += i
print(ans)

Solution (Python):
n = int(input())
ans = 0
for i in range(1,n+1):
    if i % 3 != 0 and i % 5 != 0:
        ans += i
print(ans)

Solution (Python):
n = int(input())

ans = 0
for i in range(1,n+1):
    if i%3 != 0 and i%5 != 0:
        ans += i

print(ans)

Solution (Python):
N = int(input())
result = 0
for i in range(1, (N + 1)):
    if i % 15 == 0:
        'Fizz Buzz'
    elif i % 3 == 0:
        'Fizz'
    elif i % 5 == 0:
        'Buzz'
    else:
        result = result + i
print(result)

Solution (Python):
print(sum([i for i in range(int(input()) + 1) if (i % 3 != 0 and i % 5 != 0)]))

Solution (Python):
N = int(input())
result = 0
for i in range(1, (N + 1)):
    if i % 15 == 0:
        'Fizz Buzz'
    elif i % 3 == 0:
        'Fizz'
    elif i % 5 == 0:
        'Buzz'
    else:
        result = result + i
print(result)

Solution (Python):
n = int(input())
sum = 0

for i in range(1, n+1):
    if i%3 != 0 and i%5 != 0:
        sum += i

print(sum)

Solution (Python):
n = int(input())

ans = 0
for i in range(1, n + 1):
    if (i % 3 != 0) and (i % 5 != 0):
        ans += i

print(ans)

Solution (Python):
N = int(input())
array = [0]*N
for i in range(N):
  if (i+1) % 3 == 0 or (i+1) % 5 == 0:
    continue
  else:
    array[i] = i+1
print( sum(array) )

Solution (Python):
N = int(input())
print(sum(map(lambda x:x if (x % 3 != 0) and (x % 5 != 0) else 0,list(range(N + 1)))))

Solution (Python):
N=int(input())
ans=0
for i in range(1,N+1):
    if i%3!=0 and i%5!=0:
        ans+=i
print(ans)

Solution (Python):
N=int(input())
num=list(range(1,N+1))
num1=[i for i in num if (i%3!=0 and i%5!=0)]
print(sum(num1))

Solution (Python):
number = int(input())

ans = 0
i: int
for i in range(1, number + 1):
    if i % 3 == 0 or i % 5 == 0:
        continue
    ans += i

print(ans)

Solution (Python):
N=int(input())
c=0
for i in range(1,N+1):
  if i%3!=0 and i%5!=0:c+=i
    
print(c)

Solution (Python):

N = int(input())
ans = 0
for i in range(1,N+1):
    if i % 3 != 0 and i %5 != 0:
        ans += i

print(ans)

Solution (Python):
def resolve():
    n = int(input())
    ans = 0
    for i in range(1,n+1):
        if i%3!=0 and i%5!=0:
            ans += i
    print(ans)
resolve()

Solution (Python):
def to_fizzbuzz(number):
    if number % 15 == 0:
        return 'FizzBuzz'

    if number % 3 == 0:
        return 'Fizz'

    if number % 5 == 0:
        return 'Buzz'

    else:
        return str(number)
        

def main():
    N = int(input())
    
    fblist = []
    for number in range(1, 10**6):
        result = to_fizzbuzz(number)
        fblist.append(result)

    
    n_list = fblist[0:N]
    

    n_numlist = []

    for s in n_list:
        if s.isdigit() == True:
            n_numlist.append(int(s))

    print(sum(n_numlist))


main()

Solution (Python):
N = int(input())
temp = []
for i in range(1,N+1):
    if (i%3 ==0)or(i%5==0)or((i%3==0)&(i%5==0)):
        pass
    else:
        temp.append(i)
print(sum(temp))

Solution (Python):
N = int(input())
list = []
for i in range(1, N + 1):
    if i % 3 == 0 and i % 5 == 0:
        "FizzBuzz"
    elif i % 3 == 0:
        "Fizz"
    elif i % 5 == 0:
        "Buzz"
    else:
        list.append(i)
print(sum(list))

Solution (Python):
N = int(input())
answer = 0

for i in range(1, N + 1):
    if i % 3 != 0 and i % 5 != 0:
        answer += i

print(answer)

Solution (Python):
n = int(input())
sum = 0
for i in range(1, n+1):
    if((i % 3 * i % 5 * i % 15) != 0):
        sum += i
print(sum)

Solution (Python):

n = int(input())


sum = 0

for i in range(1, n + 1):
    if i % 15 == 0:
        i = 'FizzBuzz'
    elif i % 3 == 0:
        i = 'Fizz'
    elif i % 5 == 0:
        i = 'Buzz'
    else:
        sum += i

print(sum)

Solution (Python):
n = int(input())
ans = 0
for i in range(1,n+1) :
    if(i % 3 == 0 or i % 5 == 0) :
        continue
    ans += i
print(ans)

Solution (Python):
N = int(input())

Ndiv3 = N // 3
Ndiv5 = N // 5
Ndiv15 = N // 15

ans = (N*(N + 1) - 3*Ndiv3*(Ndiv3 + 1) - 5*Ndiv5*(Ndiv5 + 1) + 15*Ndiv15*(Ndiv15 + 1))//2
print(ans)

Solution (Python):
N = int(input())
sum = 0
for i in range(1, N+1):
  if i % 3 != 0 and i % 5 != 0:
    sum += i
print(sum)

Solution (Python):
def main():
    n = int(input())
    ans = 0

    for i in range(1, n+1):
        if i % 3 != 0 and i % 5 != 0:
            ans += i

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())

Flag = [False]*(N+1)
Flag[0] = True

num = 3
while num <= N:
    Flag[num] = True
    num += 3

num = 5
while num <= N:
    Flag[num] = True
    num += 5

count = 0
for f in range(1, N+1):
    if Flag[f] == False:
        count += f

print(count)

Solution (Python):
N = int(input())

ans = 0
for i in range(N):
    num = i + 1
    if num % 3 and num % 5:
        ans += num

print(ans)

Solution (Python):
N = int(input())
list = []

for i in range(1, N + 1):
    if i % 3 == 0 and i % 5 == 0:
        "FizzBuzz"
    elif i % 3 == 0:
        "Fizz"
    elif i % 5 == 0:
        "Buzz"
    else:
        list.append(i)
print(sum(list))

Solution (Python):
ans = 0
for a in range(1, int(input())+1):
    if a % 3 != 0 and a % 5 != 0:
        ans += a
print(ans)

Solution (Python):
import sys
import math
from collections import defaultdict,deque

input = sys.stdin.readline
def inar():
    return [int(el) for el in input().split()]
def main():
    n=int(input())
    ans=0
    for i in range(1,n+1):
        if i%3==0 or i%5==0:
            continue
        else:
            ans+=i
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())

ans = 0
for i in range(1, N+1):
    if i % 3 == 0 or i % 5 == 0:
        continue
    ans += i
print(ans)

Solution (Python):
number = int(input())

answer = 0
for i in range(1, number + 1):
    if i % 3 != 0 and i % 5 != 0:
        answer = answer + i

print(answer)

Solution (Python):
n = int(input())
tot = 0
for i in range(1,n+1):
    if i%3!=0 and i%5!=0 and i%15!=0:
        tot += i
print(tot)

Solution (Python):
n = int(input())
an = 0
for i in range(1,n+1):
  if(i%3!=0 and i%5!=0):
    an +=i
print(an)

Solution (Python):
n = int(input())

ans = 0
for i in range(1, n+1):
    if i%3 != 0 and i%5 != 0:
        ans += i
print(ans)

Solution (Python):
N = int(input())
sum = 0
 
for i in range(1,N+1):
        if i % 3 == 0 and i % 5 == 0:
            i = ["FizzBuzz"]
        elif i % 3 == 0:
            i = ["Fizz"]
        elif i % 5 == 0:
            i = ["Buzz"]
    
        else:
            sum += i
print(sum)

Solution (Python):
n=int(input())
str_n=str(n)
list_n=list(str_n)
count=0
for i in range(1,n+1):
	if(i%3==0 or i%5==0):
		count+=0
	elif(i%3==0):
		count+=0
	elif(i%5==0):
		count+=0
	else:
		count+=i

print(int(count))

Solution (Python):
n=int(input())
ans=0
for i in range(1,n+1):
    if i%3!=0 and i%5!=0:
        ans+=i
print(ans)

Solution (Python):
n = int(input())
count = 0
for i in range(1,n+1):
  if i % 3 == 0:
    continue
  elif i % 5 == 0:
    continue
  else:
    count += i
print(count)

Solution (Python):
N=int(input())
sum=0
for i in range(1,N+1):
  if i%3!=0 and i%5!=0:
    sum=sum+i
print(sum)

Solution (Python):
N = int(input())

ans = 0
for i in range(N+1):
  if(i%3 != 0 and i%5 != 0):
    ans += i
print(ans)

Solution (Python):
n=int(input())
a=n//3
b=n//5
c=n//15

print(n*(n+1)//2-3*a*(a+1)//2-5*b*(b+1)//2+15*c*(c+1)//2)

Solution (Python):
n = int(input())
number = []
for i in range(1,n+1):
    if i % 3 != 0 and i % 5 != 0:
        number.append(i)
print(sum(number))

Solution (Python):
N = int(input())
kotae = 0
for i in range(0,N+1):
    if i%3 == 0 or  i%5 == 0:
        kotae = kotae
    else:
        kotae = kotae + i
print(kotae)

Solution (Python):
n = int(input())

f = n//3
b = n//5
fb = n//15

def s(x):
  return x*(x+1)/2

ans = s(n) - 3*s(f) - 5*s(b) + 15*s(fb)
print(int(ans))

Solution (Python):
n = int(input())
answer = 0 

for i in range(1, n + 1):
    if i % 3 == 0 or i % 5 == 0:
        continue
    else:
        answer += i

print(answer)

Solution (Python):
n = int(input())
ans = 0

for i in range(1,n+1):
    if i % 3 == 0 or i % 5 == 0:
        continue
    else:
        ans += i

print(ans)

Solution (Python):
print(sum([ x for _ in range(int(input())) if not ((x:=_+1)%3==0 or x%5==0) ]))

Solution (Python):
N = int(input())

ans = 0
for i in range(1, N+1):
    if i % 3 != 0 and i % 5 != 0:
        ans += i

print(ans)

Solution (Python):
N = int(input())
S = 0

for i in range(1, N + 1):
    if i % 15 == 0:
        S += 0
    elif i % 3 == 0:
        S += 0
    elif i % 5 == 0:
        S += 0
    else:
        S += i
print(S)

Solution (Python):
N = int(input())

S = []

for i in range(1, N + 1):
    if i % 3 != 0 and i % 5 != 0:
        S.append(i)
    else:
        pass

print(sum(S))

Solution (Python):
N = int(input())

sum=0
for i in range(1, N+1):
  if i%3!=0 and i%5!=0:
    sum=sum+i

print(sum)

Solution (Python):
n=int(input())
ans = 0
ans += n*(n+1)//2
ans += 15*(n//15)*(n//15+1)//2
ans -= 3*(n//3)*(n//3+1)//2
ans -= 5*(n//5)*(n//5+1)//2
print(ans)

Solution (Python):
def main():
    N = int(input())
    total = 0
    for i in range(1, N+1):
        if (i % 3 != 0) and (i % 5 != 0):
            total += i
    print(total)


main()

Solution (Python):
ans = 0
for i in range(1,int(input())+1):
  if i%3==0 or i%5==0:
    continue
  else:
    ans += i
print(ans)

Solution (Python):
N = int(input())
sum = 0

for i in range(1,N+1):
        if i % 3 == 0 and i % 5 == 0:
            i = ["FizzBuzz"]
        elif i % 3 == 0:
            i = ["Fizz"]
        elif i % 5 == 0:
            i = ["Buzz"]
    
        else:
            sum += i
print(sum)

Solution (Python):
N = int(input())
sum = 0

for i in range(1, N+1):
  if ((i % 3) != 0 and (i % 5) != 0):
    sum += i

print(sum)

Solution (Python):
count = 0
for i in range(1, int(input()) + 1):
    if not(i % 5 == 0) and not(i % 3 == 0):
        count = count + i

print(count)

Solution (Python):
N = int(input())
total = 0
 
for i in range(1, N+1):
    if i % 3 != 0 and i % 5 != 0:
        total += i
 
print(total)

Solution (Python):
N = int(input())
sum = 0

for i in range(1, N + 1):
    if not i % 3 == 0 and not i % 5 == 0:
        sum += i

print(sum)

Solution (Python):
N = int(input())
total = 0

for i in range(1, N+1):
    if i % 3 != 0 and i % 5 != 0:
        total += i

print(total)

Solution (Python):
import numpy as np
def main():
    n = int(input())
    x = np.arange(n + 1)
    x[x % 3 == 0] = 0
    x[x % 5 == 0] = 0
    print(x.sum())

if __name__ == '__main__':
    main()

Solution (Python):

n = int(input())
ans = 0 
for i in range(1,n+1):
    if (i%3 !=0) and (i%5 !=0):
        ans += i
print(ans)

Solution (Python):
N = int(input())
sum = 0

for i in range(1, N + 1):
    if not i % 3 == 0 and not i % 5 == 0:
        sum += i

print(sum)

Solution (Python):
N = int(input())
l = [i for i in range(1, N + 1) if i % 3 != 0 and i % 5 != 0]
s = sum(l)
print(s)

Solution (Python):
n = int(input())
res = 0
for i in range(1,n+1):
  if i % 3 == 0 or i % 5 == 0:
    continue
  res += i
print(res)

Solution (Python):
num = int(input())

ls = []

for i in range(num):
    ls.append(True)

f = 3
z = 5

while f <= num:
    ls[f-1] = False
    f += 3

while z <= num :
    ls[z-1] = False
    z += 5

ans = 0

for i in range(num):
    if ls[i]:
        ans += i+1
    
print(ans)

Solution (Python):
n = int(input())
count = 0
for i in range(1, n+1):
  if i % 3 != 0 and i % 5 != 0:
        count += i
print(count)

Solution (Python):
N = int(input())

i = 1
sum = 0
while True:
  if i%3!=0 and i%5!=0:
    sum +=i
  i+=1
  if i==N+1:
    break
    
print (sum)

Solution (Python):
n = int(input())
s = 0
for i in range(1, n + 1):
    if i % 3 != 0 and i % 5 != 0:
        s += i
print(s)

Solution (Python):
N = int(input())

answer = 0

for i in range(1, N + 1):
    if i % 3 != 0 and i % 5 != 0:
        answer = answer + i

print(answer)

Solution (Python):

N = int(input())
s = 0
for i in range(1, N + 1):
    if i % 15 == 0:
        s = s 
    elif i % 3 == 0:
        s = s 
    elif i % 5 == 0:
        s = s 
    else:
        
        s = s+i
print(s)

Solution (Python):
N = int(input())
answer = 0

for i in range(1, N + 1):
    if i % 3 != 0 and i % 5 != 0:
        answer += i

print(answer)

Solution (Python):
N = int(input())
A = 0
for i in range(1, N+1):
    if (i % 3 != 0) and (i % 5 != 0):
        A += i

print(A)

Solution (Python):
N = int(input())

l = [i for i in range(N+1) if i % 3 != 0 and i % 5 != 0]
print(sum(l))

Solution (Python):
n = int(input())

sum = 0

for i in range(1, n + 1):
    if i % 3 != 0 and i % 5 != 0:
        sum += i

print(sum)

Solution (Python):
import sys
import numpy as np
from math import ceil as C, floor as F, sqrt
from collections import defaultdict as D, Counter as CNT
from functools import reduce as R
import heapq as HQ

class Heap:
  def __init__(self, data, reverse=False):
    self.reverse = -1 if reverse else 1
    self.data = [self.reverse * d for d in data]
    HQ.heapify(self.data)
  def push(self, x): return HQ.heappush(self.data, self.reverse * x)
  def pop(self): return self.reverse * HQ.heappop(self.data)

ALP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
alp = 'abcdefghijklmnopqrstuvwxyz'
def _X(): return sys.stdin.readline().rstrip().split(' ')
def _S(ss): return tuple(ss) if len(ss) > 1 else ss[0]
def S(): return _S(_X())
def Ss(): return list(S())
def _I(ss): return tuple([int(s) for s in ss]) if isinstance(ss, tuple) else int(ss)
def I(): return _I(S())
def _Is(ss): return list(ss) if isinstance(ss, tuple) else [ss]
def Is(): return _Is(I())

n = I()

def fizzbuzz(i):
    return i % 3 == 0 or i % 5 == 0

print(np.sum([i for i in range(n+1) if not fizzbuzz(i)]))

Solution (Python):
n = int(input())
sum = 0
for num in range(1,n+1):
    if num%3 !=0 and num%5 != 0:
        sum += num
print(sum)

Solution (Python):
import math
import sys
import os
from operator import mul

sys.setrecursionlimit(10**7)

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(_S())
def LS(): return list(_S().split())
def LI(): return list(map(int,LS()))

if os.getenv("LOCAL"):
    inputFile = basename_without_ext = os.path.splitext(os.path.basename(__file__))[0]+'.txt'
    sys.stdin = open(inputFile, "r")
INF = float("inf")


N = I()
ans = 0

for i in range(1,N+1):
    if i%3==0 or i%5==0:
        continue
    ans +=i

print(ans)

Solution (Python):
n = int(input())
a = []

for x in range(1,n+1):
  if x % 15 == 0:
    x = "FizzBuzz"
  elif x % 3 == 0:
    x = "Fizz"
  elif x % 5 == 0:
    x = "Buzz"
  else :
    a.append(x)
  

print(sum(a))

Solution (Python):
N = int(input())
ans = 0
for n in range(1, N+1):
    if n % 3 == 0 and n % 5 == 0:
        pass
    elif n % 3 == 0:
        pass
    elif n % 5 == 0:
        pass
    else:
        ans += n % (10**9+7)
print(ans)

Solution (Python):
n = int(input())
sum = 0

for i in range(1, n + 1):
    if i % 3 != 0 and i % 5 != 0:
        sum += i

print(sum)

Solution (Python):
N = int(input())
s = 0
i = 1
while i <= N:
    if i % 3 != 0 and i % 5 != 0:
        s += i
    i += 1
print(s)

Solution (Python):
N = int(input())
s = 0
for i in range(1, N +1):
    if i % 3 == 0 or i % 5 == 0:
        pass
    else:
        s += i
print(s)

Solution (Python):
N = int(input())
s = 0
for i in range(1, N +1):
    if i % 3 == 0 or i % 5 == 0:
        continue
    s += i
print(s)

Solution (Python):
N = input()

answer = 0

for i in range(1, int(N) + 1):
    if (i % 3 > 0) and (i % 5 > 0):
        answer += i

print(answer)

Solution (Python):
N = int(input())
ans = 0
for i in range(1, N+1):
  if i%3 != 0 and i%5 != 0:
    ans += i
print(ans)

Solution (Python):
n = int(input())
a = 0
for i in range(1, n+1):
  if i % 3 != 0 and i % 5 != 0:
    a += i
print(a)

Solution (Python):
n = int (input())

sum = 0

for i in range(1, n + 1):
    if i % 3 != 0 and i % 5 != 0:
        sum += i

print(sum)

Solution (Python):
N = int(input())
sum = 0

for i in range(1, N + 1):
    if i % 3 != 0 and i % 5 != 0:
        sum += i

print(sum)

Solution (Python):
n = int(input())
sum = 0

for i in range(1, n + 1):

    if i % 3 != 0 and i % 5 != 0:
        sum = sum + i

print(sum)

Solution (Python):

N = int(input())


result = 0


for i in range(1, N + 1):
    if i % 15 == 0:
        result += 0
    elif i % 3 == 0:
        result += 0
    elif i % 5 == 0:
        result += 0
    else:
        result += i
print(result)

Solution (Python):















N = input()
I = []
for i in range(1,int(N)+1):
    if (i % 3 != 0) and (i % 5 != 0):
        I.append(i)

Sum = sum(I)
print(Sum)

Solution (Python):
a=int(input())
b=0
for i in range(a+1):
  if i%3!=0 and i%5!=0:
    b=b+i
print(b)

Solution (Python):

n = int(input())


sum = 0

for i in range(1, n + 1):
    if i % 15 == 0:
        i = 'FizzBuzz'
    elif i % 3 == 0:
        i = 'Fizz'
    elif i % 5 == 0:
        i = 'Buzz'
    else:
        sum += i

print(sum)

Solution (Python):
N=int(input())
b=0

for i in range(1,N+1):
    if i%3!=0 and i%5!=0:
        b+=i
print(b)

Solution (Python):
N = int(input())
def f(n):
    k = N // n
    return n * k * (k+1) // 2
ans = f(1) - f(3) - f(5) + f(15)
print(ans)

Solution (Python):
n = int(input())
s = 0
for i in range(1,n+1):
  if i%3 != 0 and i % 5 != 0:
    s += i
    
print(s)

Solution (Python):
N = int(input())
sum = 0

if (1 <= N and N <= 10 ** 6):

    for i in range(1,N + 1):
        if ( i % 3 == 0) and ( i % 5 == 0):
        
            N = 'Fizz Buzz'
        elif i % 3 == 0:
            N = 'Fizz'
        elif i % 5 == 0:
            N = 'Buzz'
        else:
            sum += i
    print(sum)

Solution (Python):


n = int(input())

s = 0
for i in range(1,n+1):
    if i % 3 != 0 and i % 5 != 0:
        s =  s + i
        

print(s)

Solution (Python):
n=int(input())
sum=0

for i in range(n+1):
  if i%3==0 or i%5==0:
    sum+=0
  else:
    sum+=i

print(sum)

Solution (Python):
print(sum([i for i in range(1, int(input())+1) if i % 3 != 0 and i % 5 != 0]))

Solution (Python):
N = int(input())
answer = 0

for i in range(1, N + 1):
    if i % 3 != 0 and i % 5 != 0:
        answer += i

print(answer)

Solution (Python):
n = int(input())
total = []

for i in range(1, n + 1):
    if i % 15 == 0:
        "FizzBuzz"
    elif i % 3 == 0:
        "Fizz"
    elif i % 5 == 0:
        "Buzz"
    else:
        total.append(i)

print(sum(total))

Solution (Python):
n = int(input())
total = []

for i in range(1, n + 1):
    if (i % 3 == 0) and (i % 5 == 0):
        "FizzBuzz"
    elif i % 3 == 0:
        "Fizz"
    elif i % 5 == 0:
        "Buzz"
    else:
        total.append(i)

print(sum(total))

Solution (Python):
n = int(input())
number_list = []
for i in range(1, n + 1):
    if i % 15 == 0:
        pass
    elif i % 3 == 0:
        pass
    elif i % 5 == 0:
        pass
    else:
        number_list.append(i)

print(sum(number_list))

Solution (Python):
n = int(input())
number_list = []
for i in range(1, n + 1):
    if i % 15 == 0:
        None
    elif i % 3 == 0:
        None
    elif i % 5 == 0:
        None
    else:
        number_list.append(i)

print(sum(number_list))

Solution (Python):
n = int(input())
sum = 0
for i in range(n) :
  if (i+1)%3 != 0 and (i+1)%5 != 0 :
    sum += i+1
print(sum)

Solution (Python):

a = int(input())


answer = 0


for i in range(1, a + 1):
    if i % 3 == 0 and i % 5 == 0:
        continue
    elif i % 3 == 0:
        continue
    elif i % 5 == 0:
        continue
    else:
        answer += i


print(answer)

Solution (Python):


N = int(input())

S = []

for i in range(1, N+1 ):
    if i % 3 != 0 and i % 5 != 0 :
        S.append(i)
    else:
        pass

print(sum(S))

Solution (Python):
n=int(input())

a=0
b=0
c=0

for i in range(1,n//3+1):
  a+=3*i

for i in range(1,n//5+1):
  b+=5*i
 
for i in range(1,n//15+1):
  c+=15*i
  
print(int(1/2*n*(n+1)-(a+b-c)))

Solution (Python):
total = 0

n = int(input())
for i in range(1, n + 1):
    if not ((i % 5 == 0) or (i % 3 == 0)):
        total = total + i
        
print(total)

Solution (Python):
total = 0
n = int(input())
for i in range(1, n + 1):
    if not ((i % 5 == 0) or (i % 3 == 0)):
        total = total + i
print(total)

Solution (Python):
n = int(input())

total = []

for i in range(1, n + 1):
    if i % 15 == 0:
        "FizzBuzz"
    elif i % 5 == 0:
        "Buzz"
    elif i % 3 == 0:
        "Fizz"
    else:
        total.append(i)

print(sum(total))

Solution (Python):
N=int(input())
lis=[0]*(N+10)
i=1

while i<=N:
  if i%3!=0 and i%5!=0:
    lis[i]=i
  i+=1
print(sum(lis))

Solution (Python):


total = 0
n = int(input())
for i in range(1, n + 1):
    if not ((i % 5 == 0) or (i % 3 == 0)):
        total = total + i
print(total)

Solution (Python):


sum = 0
n = int(input())
for i in range(1, n + 1):
    if not ((i % 5 == 0) or (i % 3 == 0)):
        sum = sum + i
print(sum)

Solution (Python):
n = int(input())

total = []


for i in range(1, n + 1):
    if i % 15 == 0:
        "FizzBuzz"
    elif i % 5 == 0:
        "Buzz"
    elif i % 3 == 0:
        "Fizz"
    else:
        total.append(i)  
print(sum(total))

Solution (Python):
n = int(input())
list = []

for i in range(1, n + 1):
    if i % 3 == 0 and i % 5 == 0:
        'FizzBuzz'
    elif i % 3 == 0:
        'Fizz'
    elif i % 5 ==0 :
        'Buzz'
    else:
        list.append(i)

print(sum(list))

Solution (Python):
n = int(input())
Total = []

for i in range(1, n + 1):

    if (i % 3 == 0) and (i % 5 == 0):
        "FizzBuzz"
    elif i % 3 == 0:
        "Fizz"
    elif i % 5 == 0:
        "Buzz"
    else:
        Total.append(i)

print(sum(Total))

Solution (Python):


N = int(input())
sum = 0 

for i in range(1, N + 1):
    if i % 5 == 0 or i % 3 == 0:
        continue
    else:
        sum = sum + i

print(sum)

Solution (Python):
N = int(input())
result = 0
for i in range(1, (N + 1)):
    if i % 15 == 0:
        'Fizz Buzz'
    elif i % 3 == 0:
        'Fizz'
    elif i % 5 == 0:
        'Buzz'
    else:
        result = result + i
print(result)

Solution (Python):

N = int(input())

total = []


for x in range(1, N+1):
    if x % 15 == 0:
        "FizzBuzz"
    elif x % 5 == 0:
        "Buzz"
    elif x % 3 == 0:
        "Fizz"
    else:
        total.append(x) 
print(sum(total))

Solution (Python):
N = int(input())
sum = 0

for i in range(1, N + 1):
    if i % 3 != 0 and i % 5 != 0:
        sum += i

print(sum)

Solution (Python):
result = 0
N = int(input())
for N in list(range(1, N+1)):
    if int(N % 3 != 0) and int(N % 5 != 0):
        result = result + N
print(result)

Solution (Python):
N = int(input())
S = sum(i for i in range(1, N + 1) if not (i % 3 == 0 or i % 5 == 0))
print(S)

Solution (Python):
number = int(input())
Total = []

for i in range(1, number + 1):
    if number % 3 == 0 and i % 5 ==0:
        "FizzBuzz"
    elif i % 3 ==0:
        "Fizz"
    elif i % 5 == 0:
        "Buzz"
    else:
        Total.append(i)

print(sum(Total))

Solution (Python):
N = int(input())
sum = 0

for i in range(1,N+1):
    if i % 3 != 0:
        if i % 5 != 0:
            sum += i
print(sum)

Solution (Python):
n = int(input())
total = []  

for i in range(1, n + 1):
    if i % 3 == 0 and i % 5 == 0:
        "FizzBuzz"
    elif i % 3 == 0:
        "Fizz"
    elif i % 5 == 0:
        "Buzz"
    else:
        total.append(i)  
print(sum(total))

Solution (Python):

n = int(input())


answer = 0
for i in range(1, n + 1):
    if not i % 3 == 0 and not i % 5 == 0:
        answer += i

print(answer)

Solution (Python):

N = int(input())


sum = 0

for i in range(1, N + 1):

    if (i % 3 != 0) and (i % 5 != 0):
        sum += i

print(sum)

Solution (Python):
n = int(input())
total = []
for i in range(1, n + 1):
    if i % 3 == 0 and i % 5 == 0:
        "FizzBuzz"
    elif i % 3 == 0:
        "Fizz"
    elif i % 5 == 0:
        "Buzz"
    else:
        total.append(i)
print(sum(total))

Solution (Python):




N = int(input())
answer = 0

for i in range(1, N + 1):
    if (i % 3 != 0) and (i % 5 != 0):
        answer += i

print(answer)

Solution (Python):
N = int(input())
answer = 0

for i in range(1, N + 1):
    if i % 3 != 0 and i % 5 != 0:
        answer += i

print(answer)

Solution (Python):


N = int(input())
answer = 0

for i in range(1, N + 1):
    if i % 3 != 0 and i % 5 != 0:
        answer += i

print(answer)

Solution (Python):



N = int(input())

result = 0

for i in range(1, N + 1):
    if i % 3 != 0 and i % 5 != 0:
        result += i

print(result)

Solution (Python):
n = int(input())
x = 0
for i in range(1, n + 1):
    if i % 5 == 0 or i % 3 == 0:
        pass
    else:
        x += i

print(x)

Solution (Python):
print(sum(i for i in range(1, int(input()) + 1) if i % 3 != 0 and i % 5 != 0))

Solution (Python):
N = int(input())
total = 0
for i in range(1, N + 1):
    if i % 3 != 0 and i % 5 != 0:
        total += i
print(total)

Solution (Python):
N = int(input())
sum=0
for i in range(1, N+1):
    if i%3!=0 and i%5!=0:
        sum += i
print(sum)

Solution (Python):

N = int(input())

answer = 0
for i in range(1, N + 1):
    if (i % 3 != 0) and (i % 5 != 0):
        answer += i

print(answer)

Solution (Python):
n = int(input())

sum = 0

for i in range(1, n + 1):
    if i % 15 == 0:
        sum += 0
    elif i % 3 == 0:
        sum += 0
    elif i % 5 == 0:
        sum += 0
    else:
        sum += i

print(sum)

Solution (Python):
N = int(input())

SUM = 0

for i in range(1, N + 1):
    if i % 3 != 0:
        if i % 5 != 0:
            SUM += i

print(SUM)

Solution (Python):
N = int(input())
list = []
for i in range(1, N + 1):
    if i % 3 == 0 and i % 5 == 0:
        "FizzBuzz"
    elif i % 3 == 0:
        "Fizz"
    elif i % 5 == 0:
        "Buzz"
    else:
        list.append(i)
print(sum(list))

Solution (Python):
n = int(input())

sum = (1 + n) * n // 2

sho_3 = n // 3
sho_5 = n // 5
sho_15 = n // 15

s_3 = (sho_3 * 3 + 3) * sho_3 // 2
s_5 = (sho_5 * 5 + 5) * sho_5 // 2
s_15 = (sho_15 * 15 + 15) * sho_15 // 2


print(sum - s_3 - s_5 + s_15)

Solution (Python):

N = int(input())

sum_exclusion = 0  

for i in range(1, N + 1):
    if not (i % 15 == 0 or i % 3 == 0 or i % 5 == 0):
        sum_exclusion += i  

print(sum_exclusion)

Solution (Python):













n = int(input())


sum_num = 0
for i in range(1, n + 1):
    if not i % 3 == 0 and not i % 5 == 0:
        sum_num += i

print(sum_num)

Solution (Python):

N = int(input())


sum = 0

for i in range(1, N + 1):
    if not i % 3 == 0 and not i % 5 == 0:
        sum += i


print(sum)

Solution (Python):



N = int(input())
x = 0

for i in range(1, N + 1):
    if i % 3 != 0 and i % 5 != 0:
        x += i

print(x)

Solution (Python):
N = int(input())
sum = 0

if (1 <= N and N <= 10 ** 6):
    for i in range(1, N + 1):
        if (i % 3 == 0 & i % 5 == 0):
            N = "FizzBuzz"
        elif i % 3 == 0:
            N = "Fizz"
        elif i % 5 == 0:
            N = "Buzz"
        else:
            sum += i
    print(sum)

Solution (Python):
N = int(input())
A = 0
for i in range(1, N+1):
    if (i % 3 != 0) and (i % 5 != 0):
        A += i

print(A)

Solution (Python):
n = int(input())
cnt = 0
for i in range(1, n+1):
  if i % 5 != 0 and i % 3 != 0:
    cnt += i
print(cnt)

Solution (Python):
n = int(input())
count = 0

for i in range(1, n + 1):
    if i % 3 != 0 and i % 5 != 0:
        count += i
print(count)