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:
import numpy as np

#入力
n = int(input())

#3の倍数をFに変更
def multiples_3(matrix):
    #列ベクトルを削除(3列目)
    m_de = np.delete(fizzbuzz_list,2, axis=1)
    #Fの列ベクトルを作成
    f_list = np.zeros(j).reshape(-1, 1)
    #結合
    result = np.concatenate([m_de, f_list], 1)
    return result

#列を計算(繰り上げ)
j = -(-n // 3)

#1からnまでの配列を作成
fizzbuzz_list = np.arange(1,n+1)
#要素数
before_size = fizzbuzz_list.size
#3*n行列に変更
fizzbuzz_list.resize((j,3))

#3の倍数をFに変更
fizzbuzz_list = multiples_3(fizzbuzz_list)

#5の倍数をBに変更
n_b_1 = np.arange(3,j,5)
n_b_2 = np.arange(1,j,5)

fizzbuzz_list[n_b_1,0] = 0
fizzbuzz_list[n_b_2,1] = 0

#15の倍数をFBに変更
n_fb = np.arange(4,j,5)
fizzbuzz_list[n_fb,2] = 0

print(np.sum(fizzbuzz_list))

# np.where(fizzbuzz_list[:,2:3],fizzbuzz_list,"F")

Submission status: Wrong Answer

Solution code:
import numpy as np

#入力
n = int(input())

#3の倍数をFに変更
def multiples_3(matrix):
    #列ベクトルを削除(3列目)
    m_de = np.delete(fizzbuzz_list,2, axis=1)
    #Fの列ベクトルを作成
    f_list = np.zeros(j).reshape(-1, 1)
    #結合
    result = np.concatenate([m_de, f_list], 1)
    return result

#列を計算(繰り上げ)
j = -(-n // 3)

#1からnまでの配列を作成
fizzbuzz_list = np.arange(1,n+1)
#要素数
before_size = fizzbuzz_list.size
#3*n行列に変更
fizzbuzz_list.resize((j,3))

#3の倍数をFに変更
fizzbuzz_list = multiples_3(fizzbuzz_list)

#5の倍数をBに変更
n_b_1 = np.arange(3,j,5)
n_b_2 = np.arange(1,j,5)

fizzbuzz_list[n_b_1,0] = 0
fizzbuzz_list[n_b_2,1] = 0

#15の倍数をFBに変更
n_fb = np.arange(4,j,5)
fizzbuzz_list[n_fb,2] = 0

print(fizzbuzz_list)
print(int(np.sum(fizzbuzz_list)))

Submission status: Wrong Answer

Solution code:
import numpy as np

#入力
n = int(input())

#3の倍数をFに変更
def multiples_3(matrix):
    #列ベクトルを削除(3列目)
    m_de = np.delete(fizzbuzz_list, [2, 3], axis=1)
    #Fの列ベクトルを作成
    f_list = np.zeros(j).reshape(-1, 1)
    #結合
    result = np.concatenate([m_de, f_list], 1)
    return result

#列を計算(繰り上げ)
j = -(-n // 3)

#1からnまでの配列を作成
fizzbuzz_list = np.arange(1,n+1)
#要素数
before_size = fizzbuzz_list.size
#3*n行列に変更
fizzbuzz_list.resize((j,3))

#3の倍数をFに変更
fizzbuzz_list = multiples_3(fizzbuzz_list)

#5の倍数をBに変更
n_b_1 = np.arange(3,j,5)
n_b_2 = np.arange(1,j,5)

fizzbuzz_list[n_b_1,0] = 0
fizzbuzz_list[n_b_2,1] = 0

#15の倍数をFBに変更
n_fb = np.arange(4,j,5)
fizzbuzz_list[n_fb,2] = 0

print(np.sum(fizzbuzz_list))

# np.where(fizzbuzz_list[:,2:3],fizzbuzz_list,"F")

Submission status: Wrong Answer

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

print(N)

Submission status: Wrong Answer

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

print(N)

Submission status: Wrong Answer

Solution code:
numlist = []
for i in range(int(input())):
  if i%3 == 0 or i%5 == 0:
    continue
  numlist.append(i)
print(sum(numlist))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print(b)

Submission status: Wrong Answer

Solution code:
N = int(input())
def fbn(n):
    return (x for x in range(n) if x % 3 and x % 5 and x % 15)
print(sum(fbn(N)))

Submission status: Wrong Answer

Solution code:
N = int(input())
def fbn(n):
    return (x for x in range(n) if x % 3 and x % 5)
print(sum(fbn(N)))

Submission status: Wrong Answer

Solution code:
N = int(input())

l = list(range(0))

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

sum(l)

Submission status: Wrong Answer

Solution code:
N = int(input())
r3 = N//3
r5 = N//5
r15 = N/15
S = 1/2*N*(N+1) - 3*1/2*r3*(r3+1) -  5*1/2*r5*(r5+1) + 15*1/2*r15*(r15+1)
print(int(S))

Submission status: Wrong Answer

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

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

print(FizzBuzz)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
B=0
for i in range(N):
    if (i+1)%3!=0 and (i+1)%5==0:
        B=i+B
        print(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:
        S = S +i
print(S)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
line = input()
if int(line) %3  ==0and int(line)%5==0:
  print("FizzBuzz")
elif int(line) %3 ==0:
  print("Fizz")
elif int(line) %5 ==0:
  print("Buzz")
else:
  print(int(line))

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#ライブラリの読み込み
import math

#変数の初期化
text = 0
count = 0

#入力値の格納
n = int(input())

#計算
while count < n:
    if (count % 3 != 0) or (count % 5 != 0):
        text = text + count
    count += 1

#表示
print(text)

Submission status: Wrong Answer

Solution code:
#ライブラリの読み込み
import math

#変数の初期化
text = 0
count = 0

#入力値の格納
n = int(input())

#計算
while count < n:
    if (count % 3 != 0) and (count % 5 != 0):
        text = text + count
    count += 1

#表示
print(text)

Submission status: Wrong Answer

Solution code:
N=int(input())
sum=N*(N+1)/2
for i in range(N+1):
    if i%3==0 or i%5==0:
        sum-=i
print(sum)

Submission status: Wrong Answer

Solution code:
N=int(input())
sum=N*(N+1)/2
for i in range(N):
    if i%3==0 or i%5==0:
        sum-=i
print(sum)

Submission status: Wrong Answer

Solution code:
import sys
input=sys.stdin.readline
N = int(input())
ans = 0
for i in range(1,N+1):
    if i%3!=0 or i%5!=0:
        print(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:
    sum+=i
print(sum)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

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:
a=int(input())
anser=0
for i in range(a+1):
  print(i)
  if i%3!=0 and i%5!=0:
    anser+=i
print(anser)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
def main():
    n = int(input())
    arr = np.arange(n + 1)
    arr[3::3] = 0
    arr[5::5] = 0
    print(arr)
    print(arr.sum())
if __name__ =='__main__':
    main()

Submission status: Wrong Answer

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



print(ryokun)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

N = int(input())

count = 0

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

print(count)

Submission status: Wrong Answer

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

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

print(B)

Submission status: Wrong Answer

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

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

print(B)

Submission status: Wrong Answer

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

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

print(B)

Submission status: Wrong Answer

Solution code:
n = int(input())

a = 0


for i in range(1,n):
  
  if(i%3 == 0 or i%5 == 0):
    pass
  else:
    a += i
print(a)

Submission status: Wrong Answer

Solution code:
N = input()

b = 0

for a in range(0,int(N)):
    if a % 3 != 0 and a % 5 != 0:
        b = b + a

print(b)

Submission status: Wrong Answer

Solution code:
N = input()

b = 0

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

print(b)

Submission status: Wrong Answer

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

res = 0;

for i in range(n):
    res += i * (i % 5 != 0 and i % 3 != 0);

print(res);

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())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = 0

for i in range(1,N+1): #1からNまで
  print(i)
  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(1,N+1): #1からNまで
  print(i)
  if i%3!=0 and i%5!=0:
    ans += i
print(ans)

Submission status: Wrong Answer

Solution code:
# 入力をint型にする
N = int(input())

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

print(ans)

# Pythonの全て
# https://qiita.com/KoyanagiHitoshi/items/3286fbc65d56dd67737c#56-%E7%B5%B6%E5%AF%BE%E5%80%A4abs

Submission status: Wrong Answer

Solution code:
# 入力をint型にする
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:
# 入力をint型にする
N = int(input())

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

# Pythonの全て
# https://qiita.com/KoyanagiHitoshi/items/3286fbc65d56dd67737c#56-%E7%B5%B6%E5%AF%BE%E5%80%A4abs

Submission status: Wrong Answer

Solution code:
# 入力をint型にする
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 and i % 5 == 0:
        continue
    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(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: continue
    elif i % 3 == 0: continue
    elif i % 5 == 0: continue
    else: sum += i 
print (sum)

Submission status: Wrong Answer

Solution code:
N = int (input())
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
    else: sum += i 
print (sum)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
sum = 0
for x in range (n):
  k = x+1
  if ((k%3)or(k%5)) is False:
    sum = sum + k
print(sum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
S=1/2*N*(N+1)
FB=N//15
F=N//3
B=N//5

sum_FB=15*1/2*FB*(FB+1)
sum_F=3/2*F*(F+1)
sum_B=5/2*B*(B+1)
print(S-sum_B-sum_F+sum_FB)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect

def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    n = I()
    ans = 0
    for i in range(n):
        if i % 3 == 0 and i % 5 == 0:
            ans += 0
        elif i % 3 == 0:
            ans += 0
        elif i % 5 == 0:
            ans += 0
        else:
            ans += i
    print(ans)
    return


if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect

def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    n = I()
    ans = 0
    for i in range(n):
        if i % 3 == 0 or i % 5 == 0:
            ans += 0
        else:
            ans += i
    print(ans)
    return


if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

N = int(input())

total = 0

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

Submission status: Wrong Answer

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

N = int(input())

total = 0

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

Submission status: Wrong Answer

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

N = int(input())

intlist = []

for i in range(1,N):
    if i % 3 == 0:
        continue
    if i % 5 == 0:
        continue
    else:
        intlist.append(i)

print(sum(intlist))

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8

import sys
import math
import collections
import itertools
from inspect import currentframe
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]

N = I()

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

print(ans)

Submission status: Wrong Answer

Solution code:
# coding: utf-8

import sys
import math
import collections
import itertools
from inspect import currentframe
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]

N = I()

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

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
sum = 0
for i in range(N):
  if i % 3 != 0:
    if i % 5 != 0:
      sum += i
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:
    sum += i
print(sum)

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())

result = 0

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

Submission status: Wrong Answer

Solution code:
N = int(input())

res = 0

for i in range(N):
    if i%3 and i%5:
        res += i

print(res)

Submission status: Wrong Answer

Solution code:
def f(N):
  rt = 0
  for i in range(N):
    if i % 3 != 0 and i % 5 != 0:
      rt += i
  return rt

N = int(input())
print(f(N))

Submission status: Wrong Answer

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

for n in range(N):
    if n % 3 == 0 or n % 5 == 0:
       pass
    else:
        lst.append(n)
        # print(n)

print(sum(lst))

Submission status: Wrong Answer

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

for n in range(N):
    if n % 3 == 0:
       pass
    #     print("Fizz")
    elif n % 5 == 0:
       pass
        # print("Buzz")
    else:
        lst.append(n)
    #    print(n)

print(sum(lst))

Submission status: Wrong Answer

Solution code:
N = int(input())
lst = []
import sys
sys.setrecursionlimit(1000000) #再帰の深さの制限を広げる

for n in range(N):
    if n % 15 == 0:
       pass
    #     print("FizzBuzz")
    elif n % 3 == 0:
       pass
    #     print("Fizz")
    elif n % 5 == 0:
       pass
        # print("Buzz")
    else:
        lst.append(n)
    #    print(n)

print(sum(lst))

Submission status: Wrong Answer

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

for n in range(N):
    if n % 15 == 0:
       pass
    #     print("FizzBuzz")
    elif n % 3 == 0:
       pass
    #     print("Fizz")
    elif n % 5 == 0:
       pass
        # print("Buzz")
    else:
        lst.append(n)
    #    print(n)

print(sum(lst))

Submission status: Wrong Answer

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

for n in range(N):
    if n % 15 == 0:
       pass
    #     print("FizzBuzz")
    elif n % 3 == 0:
       pass
    #     print("Fizz")
    elif n % 5 == 0:
       pass
        # print("Buzz")
    else:
        lst.append(n)
    #    print(n)

print(sum(lst))

Submission status: Wrong Answer

Solution code:
def main():
    N = int(input())
    s = 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:
            s += i
    print(s)
main()

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

Submission status: Wrong Answer

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

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())
n3 = n/3
n5 = n/5
n15 = n/15
def sum(k):
    return k*(k+1)/2
ans = sum(n)+15*sum(n15)-3*sum(n3)-5*sum(n5)
print(int(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())
n3 = n/3
n5 = n/5
n15 = n/15
def sum(k):
    return k*(k+1)/2
ans = sum(n)+15*sum(n15)-3*sum(n3)-5*sum(n5)
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
print(n-n/3-n/5+n/15)

Submission status: Wrong Answer

Solution code:
N=int(input())

ans=0
for i in range(N):
    if (i%5!=0) and (i%3!=0) :
        ans=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
# Your code here!

def main():
    number = int(input())
    answear = sum([result for result in range(number) if result % 3 != 0 or result % 5 != 0])
    print(answear)
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!

def main():
    number = int(input())
    answear = sum([result for result in range(number) if result % 3 != 0 and result % 5 != 0])
    print(answear)
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
x = int(input())

if x % 3 == 0 and x % 5 == 0:
    print('FizzBuzz')
elif x % 3 == 0 and x % 5 != 0:
    print('Fizz')
elif x % 3 != 0 and x % 5 == 0:
    print('Buzz')
else:
    print(x)

Submission status: Wrong Answer

Solution code:
x = int(input())

if x % 3 == 0 and x % 5 == 0:
    print('FizzBuzz')
elif x % 3 == 0 and x % 5 != 0:
    print('Fizz')
elif x % 3 != 0 and x % 5 == 0:
    print('Buzz')
else:
    print(str(x))

Submission status: Wrong Answer

Solution code:
x = int(input())

if x % 3 == 0 and x % 5 == 0:
    print('FizzBuzz')
elif x % 3 == 0 and x % 5 != 0:
    print('Fizz')
elif x % 3 != 0 and x % 5 == 0:
    print('Buzz')
else:
    print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
#A = list(map(int, input().split()))
amount = (N+1) * N // 2
three = N // 3
three = (three + 1) * 3 * three // 2 if three > 0 else 0
five = N // 5
five = (five + 1) * 5 * five // 2 if five > 0 else 0
fifteen = N // 15
fifteen = (fifteen + 1) * 15 // 2 if fifteen > 0 else 0
print(amount-three-five+fifteen)

Submission status: Wrong Answer

Solution code:
N = int(input())
#A = list(map(int, input().split()))
amount = (N+1) * N // 2
three = N // 3
three = (three + 1) * 3 * three // 2
five = N // 5
five = (five + 1) * 5 * five // 2
fifteen = N // 15
fifteen = (fifteen + 1) * 15 // 2
print(amount-three-five+fifteen)

Submission status: Wrong Answer

Solution code:
def fizz_buzz_sum(N):
  not_fb = [i for i in range(N) if (i%3 != 0) and (i%5 != 0)]
  return sum(not_fb)

print(fizz_buzz_sum(int(input())))

Submission status: Wrong Answer

Solution code:
def fizz_buzz_sum(N):
  not_fizz_buzz = [i for i in range(N) if (i%3 != 0) and (i%5 != 0)]
  return sum(not_fizz_buzz)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
sum = 0
for i in range(1,n):
  if i%3==0:
    continue
  elif i%5==0:
    continue
  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:
    continue
  elif i%5==0:
    continue
  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=input()
N=int(N)
a=1

while a<N:
	a=a+1

b=1
while b<N//3:
	b=b+1
	
c=1
while c<N//5:
	c=c+1
	
d=1
while d<N//15:
	d=d+1
	

print(a+d-b-c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import numpy as np

N=int(input())
A=np.arange(N+1)
count = 0

for i in range(N+1):
    if A[i]%3 != 0 and A[i]%5 != 0 and A[i]%15 != 0:
        count = count + A[i]
        print(A[i])
print(count)

Submission status: Wrong Answer

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

print(fizz_buzz_sum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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:
n = int(input())
sum_c = 0

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

print(sum_c)

Submission status: Wrong Answer

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

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 n in range(N):
    if n % 3 == 0:
        continue
    if n % 5 == 0:
        continue
    sum = sum + n

print(sum)

Submission status: Wrong Answer

Solution code:
def could_divide(num):
  return (num%3==0 or num%5==0)
n=int(input())
answer=0
for i in range(1,n+1):
  if(could_divide(i)):
    answer+=i
print(answer)

Submission status: Wrong Answer

Solution code:
def judge(n):
  if(n%3==0):
    if(n%5==0):
      print("FizzBuzz",end="")
    else:
      print("Fizz",end="")
  else:
    if(n%5==0):
      print("Buzz",end="")
    else:
      print(str(n),end="")

m=int(input())
for i in range(1,m+1):
  judge(i)

Submission status: Wrong Answer

Solution code:
def judge(num):
  if(n%3==0):
    if(n%5==0):
      print("FizzBuzz")
    else:
      print("Fizz")
  else:
    if(n%5==0):
      print("Buzz")
    else:
      print(str(n))

n=int(input())
for i in range(1,n+1):
  judge(i)

Submission status: Wrong Answer

Solution code:
n=int(input())
if(n%3==0):
  if(n%5==0):
    print("FizzBuzz")
  else:
    print("Fizz")
else:
  if(n%5==0):
    print("Buzz")
  else:
    print(str(n))