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:
#!/usr/bin/python3
N = int(input())
wa = 0
for i in range(N):
    if i % 3 != 0 and i % 5 != 0 and i % 15 != 0:
        wa += i
print(wa)

Submission status: Wrong Answer

Solution code:
N=int(input())
S=N//15
P=[1,2,4,7,8,11,13,14]
Q=0

if S==0:
    if N < 2:
        D=1
    if N < 3:
        D=2
    if N < 7:
        D=7
    if N < 8:
        D=14
    if N < 11:
        D=22
    if N < 12:
        D=33
    if N < 14:
        D=46
    if N < 15:
        D=60
    print(D)
else:
    T=S-1
    D=(60+60+15*T*8)*S//2
    N1=N-15*S
    if N1 <2:
        D=D+1
    if N1 < 3:
        D=D+P[0]+P[2]
    if N1 < 7:
        D=D+7
    if N1 < 8:
        D=D+14
    if N1 < 11:
        D=D+22
    if N1 < 12:
        D=D+33
    if N1 < 14:
        D=D+46
    if N1 < 15:
        D=D+60
    print(D)

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:
n = int(input())
l = list(range(1,n))
l_ans = [n for n  in l if (n % 5 != 0) and (n % 3 != 0)]
print(sum(l_ans))

Submission status: Wrong Answer

Solution code:
n = list(map(int,input().split()))
x = list()

for i in n:
    m = i % 3
    if m != 0:
        m = i % 5
        if m != 0:
            x.append(i)
print(sum(x))

Submission status: Wrong Answer

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

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 = ans
  elif i%3==0:
    ans = ans
  elif i%5==0:
    ans = ans
  else:
    ans =ans+i

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []
b = []
c = []
d = []

for i in range(n):
  if i%1 == 0:
    a.append(i)
    
for j in range(n):
  if j%3 == 0:
    b.append(j)
    
for k in range(n):
  if k%5 == 0:
    c.append(k)

for l in range(n):
  if l%3 == 0 and l%5 == 0:
    d.append(l)

print(sum(a)-sum(b)-sum(c)+sum(d))

Submission status: Wrong Answer

Solution code:
S=int(input())
sum = 0
for i in range(0,S):
  remainder3 = i % 3
  remainder5 = i % 5
  if remainder3 >0 and remainder5>0:
  	sum += i
print(sum)

Submission status: Wrong Answer

Solution code:
from math import gcd
K = int(input())
total = 0
for a in range(1, K + 1):
    for b in range(1, K + 1):
        for c in range(1, K + 1):
            total += gcd(a, gcd(b, c))

print(total)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
  
def FizzBuzzz(p):
  if p % 3 != 0 and p % 5 != 0:
    return int(p)
  else:
    return 0
 
 
 
m = 0
for i in range(n):
  m = m + FizzBuzzz(i)
print(m)

Submission status: Wrong Answer

Solution code:
import math
num = int(input())
syou = math.floor(num/15)
amari = num % 15
sum = 0

list = [1,2,0,4,0,0,7,8,0,0,11,0,13,14,0]
if syou >=1:
    for x in range(syou):
        sum += 60 + 120 * x

    for i in range(amari):
        sum += list[i] + 15 * (syou)

    print(sum)

else:
    for d in range(num):
        sum += list[d]
    print(sum)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
for i in range(n):
  if i%15==0:
    ans = ans
  elif i%3==0:
    ans = ans
  elif i%5==0:
    ans = ans
  else:
    ans =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
    else:
        ans += i

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
loop = N//15 
amari = N % 15

if loop == 0:
  oomaka = 0
  tuide = 1
else :
  oomaka = 60 * loop + 135*(loop-1)
  tuide = 15 * loop 

if amari == 0:
  output = oomaka
  print(output)
if amari == 1:
  output = oomaka + tuide +1
  print(output)
if amari == 2 or amari == 3:
  output = oomaka + tuide*2 +3
  print(output)
if amari == 4 or amari == 5 or amari == 6:
  output = oomaka + 7+tuide*3
  print(output)
if amari == 7:
  output = oomaka + 14+tuide*4
  print(output)
if amari == 8 or amari == 9:
  output = oomaka + 22+tuide*5
  print(output)
if amari == 11 or amari == 12:
  output = oomaka + 33+tuide*6
  print(output)
if amari == 13:
  output = oomaka + 46+tuide*7
  print(output)
if amari == 14:
  output = oomaka + 60+tuide*8
  print(output)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
terms = int(input())
listS = []

for i in range(0, terms):
    if i % 3 == 0 or i % 5 == 0:
      listS.append("Something")
    else:
      listS.append(i)

counter = 0
for i in listS:
  if type(i) == int:
    counter += i

print(counter)

Submission status: Wrong Answer

Solution code:
n = int(input())
  
def FizzBuzzz(p):
  if p % 3 != 0 and p % 5 != 0:
    return int(p)
  else:
    return 0
 


m = 0
for i in range(n):
  m = m + FizzBuzzz(i)
print(m)

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())
s = 0
for i in range(N + 1):
    n = i + 1
    if n % 3 != 0 and n % 5 != 0:
        s += n
print(s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

X = list(range(1,x+1))

for i in range(x):
    if i%3==0 and i%5==0:
        X[i] = 'FizzBuzz'
    elif i%3==0:
        X[i] = 'Fizz'
    elif i%5==0:
        X[i] = 'Buzz'
    else:
        N = i + N
        
print(N)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
fizz = []
buzz = []
fizzbuzz = []
other = []
n = int(input())
for i in range(n):
    temp = i+1
    if (temp % 3 != 0) & (temp % 5 != 0):
        print(i+1)
        other.append(i+1)

b = sum(other)

print(b)

Submission status: Wrong Answer

Solution code:
N=int(input())
loop = N//15 
amari = N % 15

if loop == 0:
  oomaka = 0
  tuide = 1
else :
  oomaka = 60 * loop + 135*(loop-1)
  tuide = 15 * loop 

if amari == 0:
  output = oomaka
  print(output)
if amari == 1:
  output = oomaka + tuide +1
  print(output)
if amari == 2 or amari == 3:
  output = oomaka + tuide +3
  print(output)
if amari == 4 or amari == 5 or amari == 6:
  output = oomaka + 7+tuide
  print(output)
if amari == 7:
  output = oomaka + 14+tuide
  print(output)
if amari == 8 or amari == 9:
  output = oomaka + 22+tuide
  print(output)
if amari == 11 or amari == 12:
  output = oomaka + 33+tuide
  print(output)
if amari == 13:
  output = oomaka + 46+tuide
  print(output)
if amari == 14:
  output = oomaka + 60+tuide
  print(output)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**7)
N=int(input())
n=list()
m=list()
for i in range(N-1):
    if(i%3==0 or i%5==0):
        n.append(i)
    else:
        m.append(i)
print(sum(m))

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())
ans = 0
for i in range(n):
  if i%3==0 or i%5==0 or i%15==0:
    ans = ans
  else:
    ans =ans+i

print(ans)

Submission status: Wrong Answer

Solution code:


N = int(input())

fizzbuzz = []

for i in range(1, N):
    if i % 3 == 0 or 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:
n=int(input())
sum1=0
for i in range(n):
    if not(i%3==0 or i%5==0):
        sum1=sum1+i
    else:
        sum1=sum1
print(sum1)

Submission status: Wrong Answer

Solution code:
N = int(input())

sm = 0

for a in range(N):
    if a%5 == 0 and a%3 == 0:
        continue
    if a%3 == 0:
        continue
    if a%5 == 0:
        continue
    sm += a

print(sm)

Submission status: Wrong Answer

Solution code:
num = int(input())
li = [i for i in range(num)]
s = [li[i] for i in li if i % 3 == 0 or i % 5 == 0]
print(sum(li) - sum(s))

Submission status: Wrong Answer

Solution code:
A = int(input())

result_num = 0
for a in range(A):
    if a % 3 == 0 and a % 5 ==0:
        pass
    elif a % 3 == 0:
        pass
    elif  a % 5 == 0:
        pass
    else:
        result_num += a
print(result_num)

Submission status: Wrong Answer

Solution code:
N = int(input())
sum=(N-1)*N/2.0

fizz=N//3
Fizz=3*(fizz-1)*fizz/2


buzz=N//5
Buzz=5*(buzz-1)*buzz/2


fizzbuzz=N//15
FizzBuzz=15*(fizzbuzz-1)*fizzbuzz/2
x=Fizz+Buzz-FizzBuzz
print(int(sum-x))

Submission status: Wrong Answer

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

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 = n*(n-1)/2
for i in range(1,n):
    if i%3 == 0 or i%5 == 0:
        sum-=i
print(int(sum))

Submission status: Wrong Answer

Solution code:
N = int(input())

SUM = N*(N+1)/2

Fizz_count = N//3
Buzz_count = N//5
FizzBuzz_count = N//15
## r>1
def GeometricProgression(a_1,r,n):
    return int(a_1*(r^n -1)/r-1)

SUM_Fizz = GeometricProgression(3,3,Fizz_count)
SUM_Buzz = GeometricProgression(5,5,Buzz_count)
SUM_FizzBuzz = GeometricProgression(15,15,FizzBuzz_count)

result = int(SUM - SUM_Fizz - SUM_Buzz + SUM_FizzBuzz)
print(result)

Submission status: Wrong Answer

Solution code:
N = int(input())

N3 = [x for x in range(3,N,3)]
N5 = [x for x in range(5,N,5)]
N15 = [x for x in range(15,N,15)]

print(sum([x for x in range(1,N)]) - (sum(N3)+sum(N5)+sum(N15)))

Submission status: Wrong Answer

Solution code:
N = int(input())
sum=(N-1)*N/2.0

fizz=N//3
Fizz=3*(fizz-1)*fizz/2
print(Fizz)

buzz=N//5
Buzz=5*(buzz-1)*buzz/2
print(Buzz)

fizzbuzz=N//15
FizzBuzz=15*(fizzbuzz-1)*fizzbuzz/2
x=Fizz+Buzz-FizzBuzz
print(int(sum-x))

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())
sum = 0
for i in range(n+1):
    if not (i % 3 == 0 and i % 5 ==0):
        sum += i
print(sum)

Submission status: Wrong Answer

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

for count in range(n):
    if(count%3==0)or(count%5==0):
        continue
    else:
      sum=sum+count
        
print(str(sum))

Submission status: Wrong Answer

Solution code:
N=int(input())
loop = N//15 
amari = N % 15

if loop == 0:
  oomaka = 0
  tuide = 1
else :
  oomaka = 60 * loop + 135*(loop-1)
  tuide = 15 * (loop - 1)

if amari == 0:
  output = oomaka
  print(output)
if amari == 1:
  output = oomaka + tuide 
  print(output)
if amari == 2 or amari == 3:
  output = oomaka + 3*tuide
  print(output)
if amari == 4 or amari == 5 or amari == 6:
  output = oomaka + 7*tuide
  print(output)
if amari == 7:
  output = oomaka + 14*tuide
  print(output)
if amari == 8 or amari == 9:
  output = oomaka + 22*tuide
  print(output)
if amari == 11 or amari == 12:
  output = oomaka + 33*tuide
  print(output)
if amari == 13:
  output = oomaka + 46*tuide
  print(output)
if amari == 14:
  output = oomaka + 60*tuide
  print(output)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
    
N = n // 15
nsum = 0.5*N*(60 + 60 + (N-1) * 120)

for i in range(15):
    if n % 15 == 0:
        break
    if n % 3 == 0:
        continue
    if n % 5 == 0:
        continue
    nsum += n
    n = n-1

print(int(nsum))

Submission status: Wrong Answer

Solution code:
n = int(input())

list1 = []
for i in range(n):
  if i % 3 != 0 or i % 5 != 0 or i % 15 != 0:
    list1.append(i)

a = int(len(list1))
ans = 0
for i in range(a):
  ans += i
  
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

s = (n//15)*60 + (n//15)*(n//15 - 1)*60

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

print(s)

Submission status: Wrong Answer

Solution code:
#coding: utf-8
 
N  = int(input())
sum = 0
 
for i in range(N):
    if ( i % 3 != 0):
        if (i % 5 != 0):
           sum += i

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

Submission status: Wrong Answer

Solution code:
#input a integer btw 1-1000000
FBN = input('Enter a number btw 1 and 1000000')
FBNINT = int(FBN)
  
# number divisible by 3, print 'Fizz'  
# in place of the number 
if FBNINT % 15 == 0:  
  print("FizzBuzz")                                          
  
# number divisible by 5, print 'Buzz' 
# in place of the number 
elif FBNINT % 3 == 0:      
  print("Fizz")                                          
  
# number divisible by 15 (divisible  
# by both 3 & 5), print 'FizzBuzz' in 
# place of the number 
elif FBNINT % 5 == 0:          
  print("Buzz")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
#n = 1000000
#a = []
sum = 0

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

print(sum)

Submission status: Wrong Answer

Solution code:
N = 1000000

ans = 0

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

Submission status: Wrong Answer

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

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 and i%15 != 0):
        sum += i
print(sum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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+i7)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [i for i in range(n) if i%3!=0]
b = [j for j in a if j%5!=0]
c = [k for k in b if k%15!=0]
print(sum(c))

Submission status: Wrong Answer

Solution code:
a = input()
count = 0
for i in range(1, int(a)):
    if i % 3 == 0 and i % 5 == 0:
        #print('FizzBuzz')
        count += 0
    elif i % 3 == 0:
        #print('Fizz')
        count += 0
    elif i % 5 == 0:
        #print('Buzz')
        count += 0
    else:
        count += i
        #print(i)

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = eval(input())
k = 0
for i in range(0, N):
    if i % 3 == 0 and i % 5 == 0:
        i == "FizzBuzz"
    elif i%3 ==0:
        i == "Fizz"
    elif i%5==0:
        i == "Buzz"
    else:
        k = k+i
print(k)

Submission status: Wrong Answer

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

s_all = sum(range(N))
fizz = sum(list(range(3,N,3)))
buzz = sum(list(range(5,N,5)))

fb = sum(list(range(15,N,15)))

print(s_all-fizz-buzz+fb)

Submission status: Wrong Answer

Solution code:
D = [1, 3, 3, 7, 7, 7, 14, 22, 22, 22, 33, 33, 46, 60, 60]

N = int(input())

N -= 1
s = N//15
t = (60*s)*(s+1)

m = s*15
t += D[N-m] + 15*(N-m+1)

print(t)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(99999999)

inputno = input()

sum = 0
for i in range(int(inputno)):
  
  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(1, n):
    if (0 != i%3) or (0 != i%5):
        ans += i
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
#n = 1000000
a = []

for x in range(n):
	if x % 5 != 0 and x % 3 != 0:
		a.append(x)

print(int(sum(a)))

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

import sys
sys.setrecursionlimit(1000000000)

def resolve():
    N = int(input())
    temp = 0
    for count in range(N):
        if count % 3 == 0 and count % 5 == 0:
            pass
        elif count % 3 == 0:
            pass
        elif count % 5 == 0:
            pass
        else:
            temp += count
    print(temp)
resolve()

Submission status: Wrong Answer

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

for count in range(n):
    if(count%3==0)or(count%5==0):
        continue
    else:
      sum=sum+count
        
print(str(sum))

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=total+i
print(total)

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 = ans + i
print (ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
for i in range(1, n):
    if 0 != i%3 or 0 != i%5:
        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:
    if i % 15!= 0:
      ans += i
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

ns = set(range(N))
n3 = set(range(0,N,3))
n5 = set(range(0,N,5))
print(sum(ns-n3-n5))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
input_line = int(input())

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

print(allsum)

Submission status: Wrong Answer

Solution code:
q = int(input())

sum = 0
for num in range(1, q):
    if num % 15 == 0:
        pass
    elif num % 3 == 0:
        pass
    elif num % 5 == 0:
        pass
    else:
        sum += num

print(sum)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [i for i in range(n) if i%3!=0]
b = [j for j in a if j%5!=0]
print(sum(b))

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 = 0
for i in range(n):
  if i % 3 != 0 and i % 5 != 0:
    ans += i
print(ans)

Submission status: Wrong Answer

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

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
sumnu = 0
if 1 <= N and N <= 10**6:
  for i in range(N):
    if not (i % 3 == 0 or i % 5 == 0):
      sumnu += i
print(sumnu)

Submission status: Wrong Answer

Solution code:
N = int(input())

sm = 0

for a in range(N):
    if a%5 == 0 and a%3 == 0:
        sm += a
    if a%3 == 0:
        sm += a
    if a%5 == 0:
        sm += a
ans = sum(range(1,N)) - sm
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):
        i = 'FizzBazz'
    elif i%3 == 0:
        i = 'Fizz'
    elif i%5 == 0:
        i = 'Bazz'
    else:
        s = s + i
print(s)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A = int(input())

result_list = []
result_num = 0
for a in range(A):
    if a % 3 == 0 and a % 5 ==0:
        result_list.append(0)
    elif a % 3 == 0:
        result_list.append(0)
    elif  a % 5 == 0:
        result_list.append(0)
    else:
        result_num += a
print(result_num)

Submission status: Wrong Answer

Solution code:
a = input()
count = 0
for i in range(int(a)):
    if i % 3 == 0 and i % 5 == 0:
        #print('FizzBuzz')
        count += 0
    elif i % 3 == 0:
        #print('Fizz')
        count += 0
    elif i % 5 == 0:
        #print('Buzz')
        count += 0
    else:
        count += i
        #print(i)

print(count)

Submission status: Wrong Answer

Solution code:

def resolve():
    N = int(input())
    temp = 0
    for count in range(N):
        if count % 3 == 0 and count % 5 == 0:
            pass
        elif count % 3 == 0:
            pass
        elif count % 5 == 0:
            pass
        else:
            temp += count
    print(temp)
resolve()

Submission status: Wrong Answer

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

for i in range(Len):
  if i%3==0 or i%5==0:
    continue
  else:
    sum += i
print(sum)

Submission status: Wrong Answer

Solution code:

n = int(input())

total = 0
Fizz_or_Buzz = False

for i in range(0, n):

    Fizz_or_Buzz = False

    if i % 3 != 0 or i % 5 != 0 :

        if i % 3 == 0 :
            # print('Fizz')
            Fizz_or_Buzz = True
        if i % 5 == 0 :
            # print('Buzz')
            Fizz_or_Buzz = True

        if Fizz_or_Buzz == False :
            total = total + i

print(total)

Submission status: Wrong Answer

Solution code:
N = int(input())
A=N//3
B=N//5
AanB=N//15
Ssum=(1+N)*N*(1/2)
Asum=(1+A)*A*(1/2)*3
Bsum=(1+B)*B*(1/2)*5
AanBsum=(1+AanB)*AanB*(1/2)*15
print(Ssum-Asum-Bsum+AanBsum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
l = []
for i in range(N):
    if i % 3 == 0:
        l.append("Fizz")
    elif i % 5 == 0:
        l.append("Buzz")
    else:
        l.append(i)
re = 0
for j in l:
    if j == "Fizz" or j=="Buzz":
        re = re + 0
    else:
        re = re + j
print(re)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
input=int(input())

output=0
a=0
for i in range(input):
    if i%3==0:
        a=a
    elif i%5==0:
        a=a
    else:
        output=output+i
print(output)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())

sum=0

for i in range(1,n):

    if (i%3 == 0) or  (i%5 == 0):
        continue
    else:
        sum=sum+i;
print(sum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
#n = 15
a = []

for x in range(n):
	if x % 5 != 0 and x % 3 != 0:
		a.append(x)

print(sum(a))

Submission status: Wrong Answer

Solution code:
S = int(input())

print(sum([i+1 for i in range(S) if not (i%3==0 or i%5==0 )]))

Submission status: Wrong Answer

Solution code:
n = int(input())
sum = 0
for i in range(n+1):
  sum += i
sum3 = 3 * n//3 * (n//3 + 1) * (1/2)
sum5 = 5 * n//5 * (n//5 + 1) * (1/2)
sum15 = 15 * n//15 * (n//15 + 1) * (1/2)
print(int(sum - sum3 - sum5 + sum15))

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=0
i = 1
while i < n:
    if i % 15 == 0:
      i += 1
    elif i % 3 == 0:
      i += 1
    elif i % 5 == 0:
      i += 1
    else:
        ans += i
        i += 1
    
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

sm = 0

for a in range(N):
    if a%5 == 0 and a%3 == 0:
        sm += a
    elif a%3 == 0:
        sm += a
    elif a%5 == 0:
        sm += a
    else:
        continue
ans = sum(range(1,N)) - sm
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
loop = N//15 
amari = N % 15

if loop == 0:
  oomaka = 0
else :
  oomaka = 60 * loop + 135*(loop-1)
  

if amari == 0:
  output = oomaka
  print(output)
if amari == 1:
  output = oomaka + 1
  print(output)
if amari == 2 or amari == 3:
  output = oomaka + 3
  print(output)
if amari == 4 or amari == 5 or amari == 6:
  output = oomaka + 7
  print(output)
if amari == 7:
  output = oomaka + 14
  print(output)
if amari == 8 or amari == 9:
  output = oomaka + 22
  print(output)
if amari == 11 or amari == 12:
  output = oomaka + 33
  print(output)
if amari == 13:
  output = oomaka + 46
  print(output)
if amari == 14:
  output = oomaka + 60
  print(output)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A = int(input())

result_list = []
result_num = 0
for a in range(A):
    if a % 3 == 0 and a % 5 ==0:
        result_list.append(0)
    elif a % 3 == 0:
        result_list.append(0)
    elif  a % 5 == 0:
        result_list.append(0)
    else:
        result_list.append(a)
for r in result_list:
    result_num += r
print(result_num)

Submission status: Wrong Answer

Solution code:
n = int(input())
def fizzbuss(x):
    result = 0
    for i in range(x):
        if i % 5 == 0:
            result = result
        elif i % 3 == 0:
            result = result
        else:
            result += i
    return result
print(fizzbuss(n))

Submission status: Wrong Answer

Solution code:
N1 = int(input())
c = []
for i in range(1,3*N1):
    if i%3 != 0 and i%5 != 0:
        c.append(i)
    if i ==N1:
        break
sum(c)