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.



Sample input:
15


Sample output:
60

Submission status: Wrong Answer

Solution code:
n = int(input())
a = 0
for i in range(n):
    if not (i%3==0 or i%5==0):
        a = a + i

print(a)

Submission status: Wrong Answer

Solution code:
import math
from functools import reduce


def gcd(*numbers):
    return reduce(math.gcd, numbers)

k=int(input())
ans=0
for i in range(1,k+1):
    for j in range(1,k+1):
        for l in range(1,k+1):
            ans+=gcd(i,j,k)
            #print(gcd(i,j,l))
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = int(input())
n = 0

for i in range(1, a):
    if i % 15 == 0:
        continue
    if i % 5 == 0:
        continue
    if i % 3 == 0:
        continue
    n += i

print(n)

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    ans = 0
    for i in range(n):
        if (i%3==0) and (i%5==0):
            continue
        if (i%3==0):
            continue
        if (i%5==0):
            continue
        ans += i
    print(ans)
main()

Submission status: Wrong Answer

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

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

print(sum)

Submission status: Wrong Answer

Solution code:
N = int(input())

sm = sum([a for a in range(N) if a%5 != 0 and a%3 != 0])

print(sm)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())
tmp = n // 15
tmp2 = n % 15
d = [(15*(tmp) + i) for i in [0,1,2,0,4,0,0,7,8,0,0,11,0,13,14]]
for i in [0,3,5,6,9,10,12]:
    d[i] = 0
(tmp **2 * 60) + sum(d[:(tmp2+1)])

Submission status: Wrong Answer

Solution code:
n=int(input())
s=0
for i in range(n):
    if i%3==0 and i%5==0:
        s+=i
    elif i%3==0:
        s+=i
    elif i%5==0:
        s+=i
print(s)

Submission status: Wrong Answer

Solution code:
def main():
    N = int(input())

    def judge(n):
        if n % 15 == 0 or n % 3 == 0 or n % 5 == 0:
            return 0
        else:
            return n

    result = [judge(x) for x in range(N + 1)]
    print(result)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print(cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())
a=n*(n+1)
b=n//3
c=n//5
d=n//15
print(a-b-c+d)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

a = N // 3
b = N // 5
c = N // 15

d = 3*a*(a+1)/2
e = 3*b*(b+1)/2
f = 3*c*(c+1)/2

g = N*(N+1)/2

print(g-d-e+f)

Submission status: Wrong Answer

Solution code:
N = int(input())
print(["FizzBuzz" if n % 15 == 0 else "Fizz" if n % 3 == 0 else "Buzz" if n % 5 == 0 else n for n in range(1,N)])

Submission status: Wrong Answer

Solution code:
N=int(input())

all=0

for i in range(N):
    all+=i

S=0

for i in range(N):
    if i%3==0:
        S+=i
    elif i%5==0:
        S+=i
    elif i%15==0:
        S-=i
        
print(all-S)

Submission status: Wrong Answer

Solution code:
n = int(input())
list = [i for i in range(1, n) if i % 3 != 0]
list_2 = [i for i in list if i % 5 != 0]
print(sum(list_2))

Submission status: Wrong Answer

Solution code:
s=int(input())
count=1
sum=0
while(count!=s):
    if count%3==0 and count%5==0:
        pass
    elif count%3==0:
        pass
    elif count%5==0:
        pass
    else:
        sum+=count
    count+=1
print(sum)

Submission status: Wrong Answer

Solution code:
n = int(input())
sum = 0
for i in range(n):
	if i % 3 == 0 or i % 5 == 0:
		continue
	sum += i 
print(sum)

Submission status: Wrong Answer

Solution code:
N=int(input())
R=0

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

print(R)

Submission status: Wrong Answer

Solution code:
a = int(input())

result = 0
for num in range(a):
  if (num%3 != 0) & (num%5 != 0):
    result += num
    
print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
U=(1/2)*n*(n+1)
U3=(3/2)*(n//3)*(n//3+1)
U5=(5/2)*(n//5)*(n//5+1)
U15=(15/2)*(n//15)*(n//15+1)
ans=U-U3-U5+U15
print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import numpy as np

n = int(input())
ans = 0

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 0
for i in range(n):
    if (i % 3) == 0:
        continue
    if (i % 5) == 0:
        continue
    ans += i
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input(''))
s=0
for i in range(n):
    if i%3==0 and i%5==0:
        s+=0
    elif i%3==0:
        s+=0
    elif i%5==0:
        s+=0
    else:
        s+=i

print(s)

Submission status: Wrong Answer

Solution code:
a = int(input())

ans = 0

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

print(ans)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
N = int(input().rstrip())
result = 0
for i in range(1, N):
    if i % 5 == 0:
        continue
    elif i % 3 == 0:
        continue
    else:
        result += i

print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
for i in range(N):
    if i%3 == 0 or i %5 ==0:
        i += 0
    else:
        ans += i
        
print(ans)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
a = n//3
ans = ((a+1)*a//2)*3  
b = n//5
ans += ((b+1)*b//2)*5
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

count = 1
i = 1
sum = 0

while count < N:
    if i % 3 == 0 or i % 5 == 0:
        count += 1
        i += 1
        continue
    sum += i
    i += 1
    count += 1

print(sum)

Submission status: Wrong Answer

Solution code:
def main():
    N = int(input())
    ans = 0

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

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def getInput():
    return [int(i) for i in input().rstrip().split(' ')]

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

Submission status: Wrong Answer

Solution code:
n = int(input())
s = 0

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

print (s)

Submission status: Wrong Answer

Solution code:
n = int(input())

a = n//15
b = n//3
c = n//5

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

Submission status: Wrong Answer

Solution code:
a = int(input())
x = []
for i in range(a - 1):
    if (i + 1) % 3 == 0:
        if (i + 1) % 5 == 0:
            continue
        else:
            continue
    elif (i + 1) % 5 == 0:
        continue
    else:
        x.append(i + 1)
print(sum(x))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#n
n=int(input())

ans = 0

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

print(int(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
for a in range(N):
    if a % 3 != 0 and a % 5 != 0:
        ans += a

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
T = 0
for i in range(1,N):
	if i % 3 == 0 and i % 5 == 0:
		T += 0
	elif i % 3 == 0:
		T += 0
	elif i % 5 == 0:
		T += 0
	else:
		T += i
print(T)

Submission status: Wrong Answer

Solution code:
N = int(input())

x = 0

for i in range(N):
    if i % 3 == 0:
        continue

    if i % 5 == 0:
        continue

    x += i


print(x)

Submission status: Wrong Answer

Solution code:
N = int(input())
l = []
for i in range(N):
    if i%3!=0 and i%5!=0:
        l.append(i)
print(sum(l))

Submission status: Wrong Answer

Solution code:
n = int(input())

sum = (1+n)*n/2

n3 = n//3
n5 = n//5
n15 = n//15

sum3 = (1+n3)*n3/2 * 3
sum5 = (1+n5)*n5/2 * 5
sum15 = (1+n15)*n15/2 * 15

sum = sum + sum15 -sum3 -sum5

print(sum)

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = 0

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

Submission status: Wrong Answer

Solution code:
a = int(input())
sum = 0
for j in range(1,a+1,1):
   if j%3!=0 or j%5!=0:
      sum = sum + j
print(sum)

Submission status: Wrong Answer

Solution code:
i=int(input())
i1=i*(i+1)/2
i2=i//3
i3=i//5
i4=i2*(i2+1)/2
i5=i3*(i3+1)/2
i6=i//15
i7=i6*(i6+1)/2
print(i1+i4+i5-i6)

Submission status: Wrong Answer

Solution code:
N = int(input())

a = []
for i in range(N):
    if i % 3 and i % 5:
        a.append(i)
print(sum(a))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
num = int(input())
sum_num = 0
for i in range(0,num):
  if (i % 5 != 0) and (i % 3 != 0):
    sum_num += i
print(sum_num)

Submission status: Wrong Answer

Solution code:
n = 15
sum = 0
i = 0
while(i<n):
    if i%3 != 0 and i%5 !=0:
        sum += i
    i+=1
print(sum)

Submission status: Wrong Answer

Solution code:
N=int(input())
A=[]
for i in range(N):
  if i%3!=0:
    if i%5!=0:
      A.append(i)
print(sum(A))

Submission status: Wrong Answer

Solution code:
N=int(input())

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

print(Sum)

Submission status: Wrong Answer

Solution code:
N  = int(input())
num3 = N//3
sum3 = num3*(num3+1)//2
num5 = N//5
sum5 = num5*(num5+1)//2
num15 = N//15
sum15 = num15*(num15+1)//2
_sum = N*(N+1)//2

print(_sum-sum3-sum15+sum15)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = 0
for i in range(n):
    if(i % 3==0 and i % 5==0):
        continue
    elif(i % 3==0):
        continue
    elif(i % 5==0):
        continue
    else:
        a += i
print(a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#coding:utf-8
N=int(input())
fizz_buzz=list()
for i in range(1,N):
	if i%3==0 and i%5==0:
		fizz_buzz.append(0)
	elif i%3==0:
		fizz_buzz.append(0)
	elif i%5==0:
		fizz_buzz.append(0)
	else:
		fizz_buzz.append(i)

print(sum(fizz_buzz))

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    n = int(input().strip())

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
count = 0

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

print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())  #スペース抜きの複数行,１文字ずつ

A = []
for i in range(1,N):
#    print(i)
    if i % 3 == 0 or i % 5 == 0:
        A.append(0)
    else:
        A.append(i)

print(sum(A))

Submission status: Wrong Answer

Solution code:
N = input()
N = int(N)
fizbuz = []
for i in range(0,N):
    if i % 3 == 0 and i % 5 == 0:
        # fizbuz[i] = 'FizzBuzz'
        fizbuz.append(0)
    elif i % 3 == 0:
        # fizbuz[i] = 'Fizz'
        fizbuz.append(0)
    elif i % 5 == 0:
        # fizbuz[i] = 'Buzz'
        fizbuz.append(0)
    else:
        fizbuz.append(i)
result = 0
for i in fizbuz:
    result += i
print(result)

Submission status: Wrong Answer

Solution code:
num = int(input())
result = 0
for fizzbuzz in range(num):
    if fizzbuzz % 3 == 0 and fizzbuzz % 5 == 0:
        continue
    elif fizzbuzz % 3 == 0:
        continue
    elif fizzbuzz % 5 == 0:
        continue
    result += fizzbuzz

print(result)

Submission status: Wrong Answer

Solution code:
N = int(input())

n_list = []
for n in range(N):
    if n % 15 == 0:
        n_list.append(0)
    elif n % 3 == 0:
        n_list.append(0)
    elif n % 5 == 0:
        n_list.append(0)
    else:
        n_list.append(n)
num = n_list[:N]
print(sum(num))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
K=int(input())
fiz=[0]
for i in range(K):
    if i%3==0 or i%5==0:
        k=1
    else:
        fiz.append(i)
print(sum(fiz))

Submission status: Wrong Answer

Solution code:
n = int(input())
answer = 0
for i in range(n):
    if not(i % 3 == 0 or i % 5 == 0):
        answer += i
print(answer)

Submission status: Wrong Answer

Solution code:
N = eval(input())
k=0
for i in range(0,N):
  if i%3!=0 or i%5!=0:
   k = k+1
print (k)

Submission status: Wrong Answer

Solution code:
terms = int(input())
counter = 0
  
for i in range(terms):
    if i % 3 != 0 and i % 5 != 0:
        counter += i
        
print(counter)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = 0
for x in range(n):
    if x % 3 == 0 and  x % 5 == 0 :
        continue
    if x % 3 == 0:
        continue
    if x % 5 == 0 :
        continue
    a += x
print(a)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
b=int(input())
sum=0
for a in range(0,b):
    if a%3 ==0 or a%5==0:
        pass
    else:
        sum+=a
print(sum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(sum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 0
for i in range(n):
    if not (i%3 == 0 or i%5 == 0):
        ans += i

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = n//3
b = n//5
c = n//15
A = 3*a*(a+1)/2
B = 5*b*(b+1)/2
C = 15*c*(c+1)/2
print(n*(n+1)/2 - A-B+C)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

print(ans)

Submission status: Wrong Answer

Solution code:
print(sum([i*(i%3!=0)*(i%5!=0) for i in range(int(input()))]))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-


def run():
    n = int(input())
    num = 0
    for i in range(n):
        if i % 3 == 0 or i % 5 == 0:
            continue
        num += i
    print(num)


if __name__ == '__main__':
    run()

Submission status: Wrong Answer

Solution code:
N = int(input())

L = []
for i in range(1, N+1):
    if i % 3 ==0 and i % 5 ==0:
        L.append(i)
    elif i%3==0:
        L.append(i)
    elif i%5==0:
        L.append(i)

print(sum(L))

Submission status: Wrong Answer

Solution code:
N = int(input())
A = list(range(N+1))
S = sum(A)

n3 = N // 3
B = list(range(n3+1))
S3 = 3*sum(B)

n5 = N // 5
C = list(range(n5+1))
S5 = 5*sum(C)

n15 = N // 15
D = list(range(n15+1))
S15 = 15*sum(D)

print(S,S3,S5,S15)

print(S-S3-S5+S15)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

print(_sum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
Fi=N//3
Bu=N//5
FiBu=N//15
def ans(x):
    return x*(x+1)/2
print(ans(N)-ans(Fi)*3-ans(Bu)*5+ans(FiBu)*15)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**6)
ii = lambda: int(input())
mis = lambda: map(int,input().split())
lmis = lambda: list(mis())
INF = float('inf')

def main():
    n=ii()
    cnt=0
    for i in range(n):
        if i%3!=0 and i%5!=0:cnt+=i
    print(cnt)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
SUM = [0]*N
for i in range(N):
    if i%3 == 0 and i%5 == 0:
        SUM[i] = 0
    elif i%3 == 0:
        SUM[i] = 0
    elif i%5 == 0:
        SUM[i] = 0
    else:
        SUM[i] = i
print(sum(SUM))

Submission status: Wrong Answer

Solution code:
N = int(input())

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

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
FB = [0]*N
for i in range(N):

    if i % 3 != 0 and i % 5 != 0:
        FB[i] = i
print(sum(FB))

Submission status: Wrong Answer

Solution code:
a = int(input())
counta = 0
for i in range(1,a):
    if i%3 == 0 and i%5 == 0:
        continue
    elif i % 3 == 0:
        continue
    elif i % 5 == 0:
        continue
    else:
        counta += i
print(counta)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = N*(N-1)//2

t = N // 3
s = N // 5
u = N // 15

ans = ans - 3*t*(t-1)//2 - 5*s*(s-1)//2 + 15*u*(u-1)//2

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

def FizzBuzz(n):
  if n % 3 == 0 or n % 5 == 0:
    return 0
  else:
    return n

ans = sum(list(map(FizzBuzz, range(N))))
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

print(ans)

Submission status: Wrong Answer

Solution code:

def q2():
    n = int(input())
    sum_n = 0
    for i in range(n):
        if i % 5 != 0 and i % 3 != 0:
            sum_n += i
    print(sum_n)

q2()

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
for i in range(n):
    if i % 15 == 0:
        pass
    elif i % 5 == 0:
        pass
    elif i % 3 == 0:
        pass
    else:
        ans += i
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans=0

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

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

print(A)

Submission status: Wrong Answer

Solution code:
def solve():

    N = int(input())

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

    print(ans)


if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:
N=int(input())
list_A=[]
for i in range(N-1):
    if (i+1)%3==0 or (i+1)%5==0:
        continue
    else:
        list_A.append(i+1)
print(sum(list_A))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

def main(a=''):
    # 整数の入力
    a = int(input())
    # a = int(a)
    # スペース区切りの整数の入力
    # b, c = map(int, input().split())
    # b, c = map(int, input())

    # # 文字列の入力
    # a = input()
    # 出力
    # print("{} {}".format(a+b+c, s))
    sum = 0
    for i in range(a):
        if i % 3 == 0:
            continue
        elif i % 5 == 0:
            continue
        else:
            sum += i
    print(sum)


if __name__ == '__main__':
    # main('1000000')
    main()

Submission status: Wrong Answer

Solution code:
import numpy as np
import sys
import math

# n = map(int,input().split())

ans = 0
n = int(input())

for x in range(n):
    if x % 3 == 0 and x % 5 == 0:
        continue

    if x % 3 == 0:
        continue

    if x % 5 == 0:
        continue

    ans += x

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
S = int(input())

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

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
result = 0

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

print(result)

Submission status: Wrong Answer

Solution code:
n=int(input())

count = 0

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

print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
for i in range(n):
    if not (i % 3 == 0 or i % 5 == 0 or i % 15 == 0):
        ans += i
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = n*(n+1)//2
d = n%3
ans -= 3*(d+1)*d//2
e = n%5
ans -= 5*(e+1)*e//2
f = n%15
ans -= 15*(f+1)*f//2
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
list_ = []
for n in range(N):
    if n % 3 != 0 and n % 5 != 0:
        list_.append(n)
print(sum(list_))

Submission status: Wrong Answer

Solution code:
def is_fb(i):
    if i % 3 == 0:
        return True
    if i % 5 == 0:
        return True
    return False

N = int(input())

print(sum([a for a in range(1, N) if not is_fb(a)]))

Submission status: Wrong Answer

Solution code:
n = int(input())

total = 0
for num in range(0,n):
    if num % 15 == 0:
        continue
    if num % 3 == 0:
        continue
    if num % 5 == 0:
        continue

    total += num

print(total)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print(cnt)

Submission status: Wrong Answer

Solution code:
import sys

if __name__ == "__main__":
	N = int(input())

	sum = 0

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

	print(sum)

Submission status: Wrong Answer

Solution code:
n = input()

ans = 0
for i in range(0, int(n)):
    r3 = i % 3
    r5 = i % 5

    if not ((r3 == 0) and (r5 == 0) or (r3 == 0) or (r5 == 0)):
        ans += i

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

s = 0

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

print(s)

Submission status: Wrong Answer

Solution code:
N=int(input())
s=0
for i in range(N):
  s+=i
for i in range(int(N/3)):
  s-=3*i
for i in range(int(N/5)):
  s-=5*i
for i in range(int(N/15)):
  s+=15*i
print(s)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
x = int(input())
count = 0
for i in range(x):
  if i % 3 == 0:
    pass
  elif i % 5 == 0:
    pass
  else:
    count += i

print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())

r = 0
for i in range(N):
    if i%3 == 0:
        continue
    if i%5 == 0:
        continue
    r += i
print(r)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

print(sum)

Submission status: Wrong Answer

Solution code:
N = int(input())
s = 0

for i in range(N):
    if i % 15 == 0:
        pass
    elif i % 3 == 0:
        pass
    elif i % 5 == 0:
        pass
    else:
        s += i

print(s)

Submission status: Wrong Answer

Solution code:
from sys import stdin

# 1行だけ読むやつ

N = int(stdin.readline().rstrip().split()[0])
Sum = 0

for i in range(N):
    if i % 3 == 0 or i % 5 == 0 or i % 15 == 0:
        continue
    else:
        Sum += i

print(Sum)

Submission status: Wrong Answer

Solution code:

N = int(input())

fizzbuzz = []

for i in range(1, N):
    if i % 15 == 0:
        fizzbuzz.append('0')
    elif i % 3 == 0:
        fizzbuzz.append('0')
    elif i % 5 == 0:
        fizzbuzz.append('0')
    else:
        fizzbuzz.append(str(i))

num = [int(s) for s in fizzbuzz]
print(sum(num))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = []
for i in range(n+1):
    if i%3 == 0 or i%5 == 0 :
        ans.append(i)

print(sum(ans))

Submission status: Wrong Answer

Solution code:
N = input()

answer = 'Yes' if '7' in N else 'No'

print(answer)

Submission status: Wrong Answer

Solution code:
N = int(input())
S=0
for i in range(N-1):
	if (i+1)%3==0 or (i+1)%5==0 :
		continue
	else:
		S+=(i+1)

print(S)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
for i in range(n):
    if i%3==0 or i%5==0:
        pass
    else:
        ans += i
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=n*(n+1)//2
k=n//3
l=n//5
m=n//15
k=k*(k+1)//2
l=l*(l+1)//2
m=m*(m+1)//2
ans=ans-k-l+m
print(ans)

Submission status: Wrong Answer

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

for i in range(0, N):
    if i % 3 == 0 or i % 5 == 0:
        ans.append(0)
    else:
        ans.append(i)

print(sum(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
for i in range(n):
    if i % 3 == 0 or i % 5 == 0:
        x = 0
    else:
        ans += i
print(ans)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
from sys import stdin

#A, B, C = [int(x) for x in stdin.readline().rstrip().split()]
N = int(input())

counter = 0

for i in range(N):
    if (i%3 != 0) & (i%5 != 0):
        counter = counter + i

print(counter)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
answer=0
for i in range(N):
    if i%15==0:
        pass
    elif i%5==0:
        pass
    elif i%3==0:
        pass
    else:
        answer+=i
        
print(answer)