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:
a = int(input())
b = []

for i in range(a):
    if i % 15 == 0:
      pass
    elif i % 3 == 0:
      pass
    elif i % 5 == 0:
      pass
    else:
      b.append(i)
    a=a-1
print(sum(b))

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:
a = int(input())
b = []

for i in range(a):
    if i % 15 == 0:
      pass
    elif i % 3 == 0:
      pass
    elif i % 5 == 0:
      pass
    else:
      b.append(i)
print(sum(b))

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

Submission status: Wrong Answer

Solution code:
n = int(input())
a = n%15
b = n//15
c = [1,2,0,4,0,0,7,8,0,0,11,0,13,14,0]
ans = 0
if a == 0:
    ans = 60*(1+b)*b//2 + 15*8*(b-1)
else:
    ans = 60*(1+b)*b//2 + 15*8*(b-1)
    for i in range(a):
        if (i+1)%3 == 0 or (i+1)%5 == 0:
            continue
        else:
            ans = ans + 15*b + c[i]
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
from itertools import permutations,combinations,groupby
import sys,bisect,string,math,time,functools,random
def Golf():*a,=map(int,open(0))
def I():return int(input())
def S_():return input()
def IS():return input().split()
def LS():return [i for i in input().split()]
def LI():return [int(i) for i in input().split()]
def LI_():return [int(i)-1 for i in input().split()]
def NI(n):return [int(input()) for i in range(n)]
def NI_(n):return [int(input())-1 for i in range(n)]
def StoLI():return [ord(i)-97 for i in input()]
def ItoS(n):return chr(n+97)
def LtoS(ls):return ''.join([chr(i+97) for i in ls])
def GI(V,E,Directed=False,index=0):
    org_inp=[];g=[[] for i in range(n)]
    for i in range(E):
        inp=LI();org_inp.append(inp)
        if index==0:inp[0]-=1;inp[1]-=1
        if len(inp)==2:
            a,b=inp;g[a].append(b)
            if not Directed:g[b].append(a)
        elif len(inp)==3:
            a,b,c=inp;aa=(inp[0],inp[2]);bb=(inp[1],inp[2]);g[a].append(bb)
            if not Directed:g[b].append(aa)
    return g,org_inp
def GGI(h,w,boundary=1,search=[],replacement_of_found='.',mp_def={'#':1,'.':0}):
#h,w,g,sg=GGI(h,w,boundary=1,search=['S','G'],replacement_of_found='.',mp_def={'#':1,'.':0}) # sample usage
    mp=[boundary]*(w+2);found={}
    for i in range(h):
        s=input()
        for char in search:
            if char in s:
                found[char]=((i+1)*(w+2)+s.index(char)+1)
                mp_def[char]=mp_def[replacement_of_found]
        mp+=[boundary]+[mp_def[j] for j in s]+[boundary]
    mp+=[boundary]*(w+2)
    return h+2,w+2,mp,found
def TI(n):return GI(n,n-1)
def bit_combination(k,n=2):return [[tb//(n**bt)%n for bt in range(k)] for tb in range(n**k)]
def show(*inp,end='\n'):
    if show_flg:print(*inp,end=end)
def show2d(g,h,w):
    for i in range(h):show(g[i*w:i*w+w])

YN=['YES','NO'];Yn=['Yes','No']
mo=10**9+7
inf=float('inf')
l_alp=string.ascii_lowercase
#sys.setrecursionlimit(10**7)
input=lambda: sys.stdin.readline().rstrip()

## return prime factors of N as dictionary {prime p:power of p}
## within 2 sec for N = 2*10**20+7
def primeFactor(N):
    i,n=2,N
    ret={}
    d,sq=2,99
    while i<=sq:
        k=0
        while n%i==0:
            n,k,ret[i]=n//i,k+1,k+1
        if k>0 or i==97:
            sq=int(n**(1/2)+0.5)
        if i<4:
            i=i*2-1
        else:
            i,d=i+d,d^6
    if n>1:
        ret[n]=1
    return ret


## return the list of prime numbers in [2,N], using eratosthenes sieve
## within 2sec for N = 1.2*10**7
def PrimeNumSet(N):
    Max = int(N**0.5)
    seachList = [i for i in range(2,N+1)]
    primeNum = []
    while seachList:
        if seachList[0] <= Max:
            break
        primeNum.append(seachList[0])
        tmp = seachList[0]
        seachList = [i for i in seachList if i % tmp != 0]
    primeNum.extend(seachList)
    return primeNum

## retrun LCM of numbers in list b
## within 2sec for no of B = 10*5  and  Bi < 10**6
def LCM(b,mo=10**9+7):
    prs=PrimeNumSet(max(b))
    M=dict(zip(prs,[0]*len(prs)))
    for i in b:
        dc=primeFactor(i)
        for j,k in dc.items():
            M[j]=max(M[j],k)
    
    r=1
    for j,k in M.items():
        if k!=0:
            r*=pow(j,k,mo)
            r%=mo
    return r

show_flg=False
show_flg=True


n=I()
a=0
for i in range(n):
    if i%3==0 or i%5==0:
        continue
    a+=i

print(a)

Submission status: Wrong Answer

Solution code:
import math

n = int(input())
ans = 0
for i in range(1,n+1):
    for j in range(1,n+1):
        c = math.gcd(i,j)
        for k in range(1,n+1):
            ans += math.gcd(c,k)
print(ans)

Submission status: Wrong Answer

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

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

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())
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:
import math
from functools import reduce

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

k=int(input())
sum=0

for a in range(1,k+1):
    for b in range(1,k+1):
        for c in range(1,k+1):
            sum += gcd(a,b,c)

print(sum)

Submission status: Wrong Answer

Solution code:
N= int(input())
if (N < 1 or N > 1000000):
    print('error')
sum = 0
for i in range(1, N):
    if (i % 3 != 0 and i % 5 != 0 ):
        sum = sum + i
print(sum)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(300000)
from math import gcd
from collections import defaultdict

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')


K = I()
memo = dict()

def g(a, b):
    if a > b:
        a, b = b, a
    if memo.get((a, b)) is not None:
        return memo[(a, b)]
    else:
        val = gcd(a, b)
        memo[(a, b)] = val
        return val

d = defaultdict(int)
for b in range(1, K + 1):
    for c in range(1, K + 1):
        d[g(b, c)] += 1

ans = 0
for a in range(1, K + 1):
    for val, cnt in d.items():
        ans += g(a, val) * cnt
print(ans)

Submission status: Wrong Answer

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

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

print(sum)

Submission status: Wrong Answer

Solution code:
N = input()
Q = 0
for i in range(int(N)):
  P = []
  for j in range(len(str(i))):
    k= str(i)
    P.append(int(k[j]))
  if(sum(P)%3 == 0 and P[-1]%5 == 0):
      Q += 0
  elif(sum(P)%3 == 0):
      Q += 0
  elif(P[-1] == 0 or P[-1] == 5):
      Q += 0
  else:
      Q += i
print(Q)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
b = [i+1 for i in range(N)]
a = np.array(b)

c = a - a//3 *3
d = a - a//5 *5

e = c*d
sum(a*(e!=0))

Submission status: Wrong Answer

Solution code:
input_N = int(input())
output = 0
for i in range(1, input_N):
    if i % 3 == 0:
        pass
    elif i % 5 == 0:
        pass
    else:
        output += i

print(output)

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    N = int(input())
    i = []
    for num in range(1, N):
        if num % 3 == 0 or num % 5 == 0:
            continue
        else:
            i.append(num)
    print(sum(i))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = input()
Q = 0
for i in range(int(N)):
  P = []
  for j in range(len(str(i))):
    k= str(i)
    P.append(int(k[j]))
  if(sum(P)%3 == 0 and P[-1] == 0 or P[-1] == 5):
      Q += 0
  elif(sum(P)%3 == 0):
      Q += 0
  elif(P[-1] == 0 or P[-1] == 5):
      Q += 0
  else:
      Q += i
print(Q)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(a):
    if i % 15 == 0:
      pass
    elif i % 3 == 0:
      pass
    elif i % 5 == 0:
      pass
    else:
      b.append(i)
print(sum(b))

Submission status: Wrong Answer

Solution code:
N = int(input())
list = []
for i in range(N+1):
    if i % 3 == 0 and i % 5 == 0:
        list.append(i)
        continue
    elif i % 3 == 0:
        list.append(i)
        continue
    elif i % 5 == 0:
        list.append(i)
        continue
print(sum(list))

Submission status: Wrong Answer

Solution code:
n = int(input())
text = ""
result = 0
for i in range(1, n+1,1):
    print("in loop",i)
    if (i/3 != 0):
        print("A",i)
        result +=i
    else:
        pass



print(result)

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input()) 
a1 = np.arange(1,(N+1))
result = 0
for i in a1:
    if i % 3 == 0 or i % 5 == 0:
      result += i
print(result)

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())
list = []
for i in range(n+1):
    if i % 3 == 0 and i % 5 == 0:
        list.append(i)
        continue
    elif i % 3 == 0:
        list.append(i)
        continue
    elif i % 5 == 0:
        list.append(i)
        continue
print(sum(list))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
l = list(range(1,n))
if 0 >= n or n >= 10**6:
  print(0)
else:
  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:
import numpy as np
result = 0
n = int(input()) 
a = np.arange(1,(n+1)) 
for i in a:
    if i % 3 == 0 or i % 5 == 0:
      result += i
print(result)

Submission status: Wrong Answer

Solution code:
import numpy as np
result = 0
a = np.arange(1,(int(input()))+1) 
for i in a:
    if i % 3 == 0 or i % 5 == 0:
      result += i
print(result)

Submission status: Wrong Answer

Solution code:
N= int(input())
if (N < 1 or N > 1000000):
    print('error')
sum = 0
for i in range(1, N):
    if (i % 3 != 0 and i % 5 != 0 and i % 15 != 0):
        sum = sum + i
print(sum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
a=0
k=n//15
a+=60*k**2
while 0==n%15:
  if not n%3==0 and not n%5==0:
    a+=n
  n-=0
print(a)

Submission status: Wrong Answer

Solution code:
a = input()
b = int(a)
sum = 0

for i in range(1, b):
    if i % 15 == 0:
        #print("Fizz Buzz!")
        sum += 0
    elif i % 3 == 0:
        #print("Fizz!")
        sum += 0
    elif i % 5 == 0:
        #print("Buzz!")
        sum += 0
    else:
        sum += i

print(sum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
a = []
b = []

for i in range(N):
  if i % 3 == 0 or i % 5 == 0:
    a.append(i)
  else:
    b.append(i)
    
print(sum(b))

Submission status: Wrong Answer

Solution code:
n = int(input())
l = list(range(1,n))
if 0 <= n <= 10**6:
  l_ans = [n for n  in l if (n % 5 != 0) and (n % 3 != 0)]
  print(sum(l_ans))
else:
  print(0)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=int(input("a"))
b=(sum(range(3,a+1,3)))
c=(sum(range(5,a+1,5)))
d=(sum(range(15,a+1,15)))
e=a*(a+1)/2
print(int(e-b-c+d))

Submission status: Wrong Answer

Solution code:

N = int(input())
if 1 <= N <= 10**6:
    Sum = 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
        Sum = Sum + i
    print(Sum)
else:
    pass

Submission status: Wrong Answer

Solution code:
a = input()
b = int(a)
sum = 0
c = 0

for i in range(1, b):
    if i % 15 == 0:
        #print("Fizz Buzz!")
        c += 1
    elif i % 3 == 0:
        #print("Fizz!")
        c += 1
    elif i % 5 == 0:
        #print("Buzz!")
        c += 1
    else:
        sum += i

print(sum)

Submission status: Wrong Answer

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

for i in range(1, a):
    if i % 3 == 0 and i % 5 == 0:
        pass
    elif i % 3 == 0:
        pass
    elif i % 5 == 0:
        pass
    else:
      b.append(i)
print(sum(b))

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print(cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []
for i in range(n):
    if (i+1) % 15 == 0:
        a.insert(i+1,"FizzBuzz") 
    elif (i+1) % 3 == 0:
        a.insert(i+1,"Fizz") 
    elif (i+1)% 5 == 0:
        a.insert(i+1,"Buzz") 
    else:
        a.append(i+1)
        
b = [num for num in a if isinstance(num, int)]
sum(b)

Submission status: Wrong Answer

Solution code:
num = int(input())
sum = 0
for i in range(1,num+1):
  if i%3==0 or i%5==0 or (i%3==0 and i%5==0) :
    print("FizzBuzz")
  else:
    sum += i
print(sum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
#数値ひとつ
I = int(input())
#数値欲しいとき
#H, W = map(int, input().split())
#文字欲しいとき
#N = input()
#それをListにしたいとき
#listA = list(N)
a = 0
for num in range(I):
    if num%3 == 0 and num%5 == 0:
        a = a
    elif num%3 == 0:
        a = a
    elif num%5 == 0:
        a = a
    else:
        a = a + num

print(a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(a):
    if i % 3 == 0 and i % 5 == 0:
        pass
    elif i % 3 == 0:
        pass
    elif i % 5 == 0:
        pass
    else:
      b.append(i)
print(sum(b))

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 = 'FizzBuzz'
    elif i%3 == 0:
        i = 'Fizz'
    elif i%5 == 0:
        i = 'Buzz'
    else:
        s = s + i
print(int(s))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
#数値ひとつ
I = int(input())
#数値欲しいとき
#H, W = map(int, input().split())
#文字欲しいとき
#N = input()
#それをListにしたいとき
#listA = list(N)
a = 0
for num in range(I):
    if num%3 == 0 and num%5 == 0:
        print('FizzBuzz')
    elif num%3 == 0:
        print('Fizz')
    elif num%5 == 0:
        print('Buzz')
    else:
        a = a + num

print(a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
#数値ひとつ
I = int(input())
#数値欲しいとき
#H, W = map(int, input().split())
#文字欲しいとき
#N = input()
#それをListにしたいとき
#listA = list(N)
I = I + 1
a = 0
for num in range(I):
    if num%3 == 0 and num%5 == 0:
        print('FizzBuzz')
    elif num%3 == 0:
        print('Fizz')
    elif num%5 == 0:
        print('Buzz')
    else:
        a = a + num

print(a)

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    s = n // 15
    a = n % 15
    ary = [1,2,0,4,0,0,7,8,0,0,11,0,13,14,0]
    ary = [i+s*15 for i in ary][:a]
    ans = 60 * (s ** 2) + sum(ary)
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(range(n))
sum = 0
for i in a:
  if a[i] % 3 == 0 or a[i] % 5 == 0:
    a[i] = 0
  sum += a[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 = sum + i
print(sum)

Submission status: Wrong Answer

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

print(int(n))

Submission status: Wrong Answer

Solution code:
def div(k):
    if (k % 3 != 0) and (k % 5) != 0:
        return True
    else:
        return False

def main():
    n = int(input())
    ary = [i for i in range(n)]
    ary = [i if div(i) else 0 for i in ary]
    print(sum(ary))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
b=int(input())
nu=[]
count=0
for i in range(b):
    if i%3==0:
        continue
    elif i%5==0:
        continue
    else:
        nu.append(i)
print(sum(nu))

Submission status: Wrong Answer

Solution code:
import math
#数値ひとつ
I = int(input())
#数値欲しいとき
#H, W = map(int, input().split())
#文字欲しいとき
#N = input()
#それをListにしたいとき
#listA = list(N)

a = 0
for num in range(I):
    print(num)
    if num%3 == 0 and num%5 == 0:
        print('FizzBuzz')
    elif num%3 == 0:
        print('Fizz')
    elif num%5 == 0:
        print('Buzz')
    else:
        a = a + num

print(a)

Submission status: Wrong Answer

Solution code:
num = int(input())
sum = 0
for i in range(1,num+1):
  if i%3==0 or i%5==0 or i%3==0 and i%5==0 :
    print("FizzBuzz")
  else:
    sum += i
print(sum)

Submission status: Wrong Answer

Solution code:

N = int(input())
if 1 <= N <= 10**6:
    Sum = 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
        Sum = Sum + i
    print(Sum)

Submission status: Wrong Answer

Solution code:
b=int(input())
nu=[]
count=0
for i in range(15):
    if i%3==0:
        continue
    elif i%5==0:
        continue
    else:
        nu.append(i)
print(sum(nu))

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

Submission status: Wrong Answer

Solution code:
input_N = int(input())
output = 0
for i in range(1, input_N):
    if i % 15 == 0:
        pass
    elif i % 3 == 0:
        pass
    elif i % 5 == 0:
        pass
    else:
        output += i

print(output)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

result = 0

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())
n = range(1,n)
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:
import numpy as np
N = int(input())
b = [i+1 for i in range(N)]
a = np.array(b)

c = a - a//3 *3
d = a - a//5 *5

e = c*d
sum(a*(e!=0))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
S=0
for i in range(N):
    if (i%3==0)or(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())
cnt = 0
for i in range(n):
    if i % 3 == 0 or i % 5 == 0:
        pass
    else:
        cnt = cnt + i

print(cnt)

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())
S=0
for i in range(N):
    if (i%3==0)or(i%5==0):
        continue
    else:
        S+=i
print(S)

Submission status: Wrong Answer

Solution code:
N = int(input())
count_list = []
for i in range(N + 1):
    if i % 15 == 0:
        count_list.append('FizzBuzz')
    elif i % 3 == 0:
        count_list.append('Fizz')
    elif i % 5 == 0:
        count_list.append('Buzz')
    else:
        count_list.append(i)
int_list = []
for i in count_list:
    try:
        int_list.append(int(i))
    except:
        pass
print(int_list)

Submission status: Wrong Answer

Solution code:
input=int(input())

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

Submission status: Wrong Answer

Solution code:

N = input()
N = int(N)
if 1<= N <= 10**6:
    Sum = 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
        Sum = Sum + i
    print(Sum)
else:
    pass

Submission status: Wrong Answer

Solution code:
#--Fizz Buzz
N = int(input())

j = 0
for i in range(1, N+1):
  print(i)
  if i % 15 == 0:
    #fizzbuzz.append('FizzBuzz')
    pass
  elif i % 3 == 0:
    #fizzbuzz.append('Fizz')
    pass
  elif i % 5 == 0:
    #fizzbuzz.append('Buzz')
    pass
  else:
    j = j + i

print(j)

Submission status: Wrong Answer

Solution code:
import math
#数値ひとつ
I = int(input())
#数値欲しいとき
#H, W = map(int, input().split())
#文字欲しいとき
#N = input()
#それをListにしたいとき
#listA = list(N)

a = 0
for num in range(I+1):
    print(num)
    if num%3 == 0 and num%5 == 0:
        print('FizzBuzz')
    elif num%3 == 0:
        print('Fizz')
    elif num%5 == 0:
        print('Buzz')
    else:
        a = a + num

print(a)

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 p in range(n):
  m = m + FizzBuzzz(p)
print(m)

Submission status: Wrong Answer

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

for i in range(N):
    flag = 0
    if i % 3 == 0:
        flag = 1
    if i % 5 == 0:
        flag = 1

    if flag == 0:
        s += i

print(s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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:
#--Fizz Buzz
N = int(input())

j = 0
for i in range(1, N):
  print(i)
  if i % 15 == 0:
    #fizzbuzz.append('FizzBuzz')
    pass
  elif i % 3 == 0:
    #fizzbuzz.append('Fizz')
    pass
  elif i % 5 == 0:
    #fizzbuzz.append('Buzz')
    pass
  else:
    j = j + i

print(j)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
count_list = []
for i in range(N * 15 + 1):
    if i % 15 == 0:
        count_list.append('FizzBuzz')
    elif i % 3 == 0:
        count_list.append('Fizz')
    elif i % 5 == 0:
        count_list.append('Buzz')
    else:
        count_list.append(i)
int_list = []
for i in count_list:
    try:
        int_list.append(int(i))
    except:
        pass
print(sum(int_list))

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

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

Submission status: Wrong Answer

Solution code:
n=int(input())

count=0


for i in range(n):
    if(i%3==0):
        continue
    elif(i%5==0):
        continue
    else:
        count+=i

print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
sum = 0 
i = 0
while i <= n:
    sum = sum + i
    i += 1
print(int(sum/2))

Submission status: Wrong Answer

Solution code:
a = input()

n = int(a)

b = []

for i in range(1,n):
  if(i%3 == 0):
    #b.append(i)
    continue
  elif(i%5 == 0):
    #b.append(i)
    continue
  elif(i%15==0):
    #b.append(i)
    continue
  else:
    b.append(i)
    continue
print(sum(b))

Submission status: Wrong Answer

Solution code:
a = int(input())

b = range(1, a)

c = [i for i in b if i%15 == 0 and i%5 == 0 and i%3 == 0]

d = sum(c)
print(d)

Submission status: Wrong Answer

Solution code:
n = int(input())

three = (3+(n//3)*3) * (n//3)/2
five = (5+(n//5)*5) * (n//5)/2
cup = (15+(n//15)*15) * (n//15)/2
total = (1+n) * n/2

ans = total - three - five + cup

print(ans//1)

Submission status: Wrong Answer

Solution code:
n = int(input())
n = range(0,n)
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:
#--Fizz Buzz
N = int(input())
fizzbuzz = []
j = 0
for i in range(1, N):
    if i % 15 == 0:
        #fizzbuzz.append('FizzBuzz')
        pass
    elif i % 3 == 0:
        #fizzbuzz.append('Fizz')
        pass
    elif i % 5 == 0:
        #fizzbuzz.append('Buzz')
        pass
    else:
        j = j + i

print(j)

Submission status: Wrong Answer

Solution code:
n = int(input())

three = (3+(n//3)*3) * (n//3)/2
five = (5+(n//5)*5) * (n//5)/2
cup = (15+(n//15)*15) * (n//15)/2
total = (1+n) * n/2

ans = total - three - five + cup

print(ans)

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(1, n):
  m = m + FizzBuzzz(i)
print(m)

Submission status: Wrong Answer

Solution code:
N = int(input())
a = [i+1 for i in range(N)]

S = 0
for x in range(1, N):
    if x % 15 == 0:
        a[x] = "FizzBazz"
    elif x % 3 == 0:
        a[x] = "Fizz"
    elif x % 5 == 0:
        a[x] = "Bazz"
    else:
        a[x] = x
        S += x
print(S)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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:

N = input()
N = int(N)
Sum = 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
    Sum = Sum + i
print(Sum)