Problem:


Score : 200 points

Problem Statement

Let us define the FizzBuzz sequence a_1,a_2,... as follows:

If both 3 and 5 divides i, a_i=\mbox{FizzBuzz}.

If the above does not hold but 3 divides i, a_i=\mbox{Fizz}.

If none of the above holds but 5 divides i, a_i=\mbox{Buzz}.

If none of the above holds, a_i=i.

Find the sum of all numbers among the first N terms of the FizzBuzz sequence.

Constraints

1 \leq N \leq 10^6

Input

Input is given from Standard Input in the following format:

N

Output

Print the sum of all numbers among the first N terms of the FizzBuzz sequence.

Sample Input 1

15

Sample Output 1

60

The first 15 terms of the FizzBuzz sequence are:

1,2,\mbox{Fizz},4,\mbox{Buzz},\mbox{Fizz},7,8,\mbox{Fizz},\mbox{Buzz},11,\mbox{Fizz},13,14,\mbox{FizzBuzz}

Among them, numbers are 1,2,4,7,8,11,13,14, and the sum of them is 60.

Sample Input 2

1000000

Sample Output 2

266666333332

Watch out for overflow.



Sample input:
15


Sample output:
60

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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 = []

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

print(sum(ans))

Submission status: Wrong Answer

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

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:
        ans.append(i)

print(sum(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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())
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(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(1, n):
    if i%3 == 0 or i%5 == 0:
        sum += 0
    else:
        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 or i%5 == 0:
        sum = sum
    else:
        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 = sum
    else:
        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:
# 162 B
N = int(input())
ans = 0
for i in range(1,N+1):
    if i % 3 != 0 and i %5 != 0:
        print(i)
        ans += i

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if(1 <= n <= 10 ** 6):

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

print(sum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
answer = 0 # 和の格納用

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

Submission status: Wrong Answer

Solution code:
n = int(input())
answer = 0
for i in range(1, n + 1):

    if n % 15 == 0:
        continue
    elif n % 3 == 0:
        continue
    elif n % 5 == 0:
        continue
    else:
        answer += i

print(answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def fizzbuzz_cul(number):
    if number % 15 == 0:
        return "FizzBuzz"
    if number % 3 == 0:
        return "Fizz"
    if number % 5 == 0:
        return "Buzz"
    return str(number)


def main():
    number = int(input())
    if 1 <= number <= 10 ** 6:
        result = fizzbuzz_cul(number)
        print(result)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def fizzbuzz_cul(number):
    if number % 15 == 0:
        return "FizzBuzz"
    if number % 3 == 0:
        return "Fizz"
    if number % 5 == 0:
        return "Buzz"
    return str(number)


def main():
    for number in range(1, 31):
        result = fizzbuzz_cul(number)
        print(result)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
for number in range(1, 30 + 1):
    if (number % 3 == 0) and (number % 5 == 0):
        print('FizzBuzz')
    elif number % 3 == 0:
        print('Fizz')
    elif number % 5 == 0:
        print('Buzz')
    else:
        print(str(number))

Submission status: Wrong Answer

Solution code:
N = int(input())

FizzBuzzlist = [i for i in range(N)]
FizzBuzzlist.remove(0)
for i in range(len(FizzBuzzlist)):
  if FizzBuzzlist[i]%3 ==0 and FizzBuzzlist[i]%5 ==0:
    #FizzBuzzlist[i] = "FizzBuzz"
    FizzBuzzlist[i] = 0
  elif FizzBuzzlist[i]%3 ==0:
    #FizzBuzzlist[i] = "Fizz"
    FizzBuzzlist[i] = 0
  elif FizzBuzzlist[i]%5 ==0:
    #FizzBuzzlist[i] = "Buzz"
    FizzBuzzlist[i] = 0

print (sum(FizzBuzzlist))

Submission status: Wrong Answer

Solution code:

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

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
import math
import sys
import os
from operator import mul

sys.setrecursionlimit(10**7)

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

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


N = I()
ans = 0

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

print(ans)

Submission status: Wrong Answer

Solution code:
sum = 0
for i in range(1, 10 ** 6 + 1):
    if i % 3 != 0 and i % 5 != 0:
        sum += i
print(sum)

Submission status: Wrong Answer

Solution code:
number = int(input())
result = []

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

print(sum(result))

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):
        n = "FizzBuzz"
    elif (i % 3 == 0):
        n = "Fizz"
    elif (i % 5 == 0):
        n = "ZBuzz"
    else:
        sum += 1

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):
        n = "FizzBuzz"
    if (i % 3 == 0):
        n = "Fizz"
    if (i % 5 == 0):
        n = "ZBuzz"

print(sum)

Submission status: Wrong Answer

Solution code:
# 1 <= N <= 1000000
N = int(input())
 
total = []
 
for x in range(1, N+1):
    if not(x % 15 == 0 or x % 5 == 0 or x % 3 == 0):
        total.append(x)
        print(sum(total))

Submission status: Wrong Answer

Solution code:
# N:標準入力
N = int(input())

# 結果の出力のための変数定義
result = 0

# Nまでの条件以外の繰り返しの合計
for i in range(1, N + 1):
    if i % 15 == 0:
        result += 0
    elif i % 3 == 0:
        result += 0
    elif i % 5 == 0:
        result += 0
    else:
        result += i
    print(result)

Submission status: Wrong Answer

Solution code:
# N:標準入力
N = int(input())

# 結果の出力のための変数定義
result = 0

# Nまでの条件以外の繰り返しの合計
for i in range(1, N + 1):
    if (i % 15 == 0 or i % 3 == 0 or i % 5 == 0):
        result += 0
    else:
        result += i
    print(result)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:

# FizzBuzz列 a1,a2,... を次のように定めます。
#     i が 3 でも　5 でも割り切れるなら、ai=FizzBuzz
#     そうではなく i が 3 で割り切れるなら、ai=Fizz
#     そうではなく i が 5 で割り切れるなら、ai=Buzz
#     そうではないなら、ai=i
# FizzBuzz列の N項目までに含まれる数の和を求めてください。

# FizzBuzz
# 3の倍数は「Fizz」 ⇔ 「3で割った余りが0」
# 5の倍数は「Buzz」 ⇔ 「5で割った余りが0」
# 3と5両方の倍数は「FizzBuzz」 ⇔ 「3で割った余りが0」

# N:標準入力
N = int(input())

# 結果の定義
result = 0

# Nまでの条件以外の繰り返しの合計
for i in range(1, N + 1):
    if not (i % 15 == 0 or i % 3 == 0 or i % 5 == 0):
        result += i
    print(result)

Submission status: Wrong Answer

Solution code:
# N:標準入力
N = int(input())

# 結果の定義
result = 0

# Nまでの条件以外の繰り返しの合計
for i in range(1,N + 1):
    if not (i % 15 == 0 or i % 5 == 0 or i % 3 == 0):
        result += i
    print(result)

Submission status: Wrong Answer

Solution code:
n=int(input())

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

    if i %15==0:
        print('Fizz Buzz')
    elif i % 3==0:
        print('Fizz')
    elif i % 5 ==0:
        print('Buzz')
    else:
        print(i)

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

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 += 1

print(sum)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

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

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



print(sum)

Submission status: Wrong Answer

Solution code:
n=int(input())

a=0
b=0
c=0

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

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

Submission status: Wrong Answer

Solution code:
n=int(input())

a=0
b=0
c=0

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

for i in range(1,n//5+1):
  b+=5*i
 
for i in range(1,n//15+1):
  c+=15*i

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

Submission status: Wrong Answer

Solution code:
n = int(input())

totalsum = []

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:
        totalsum.append(i)

print(sum(totalsum))

Submission status: Wrong Answer

Solution code:
n=int(input())

a=0
b=0
c=0

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())
total_sum=[]

#１から入力した値までを繰り返す
for i in range(1, n + 1 ):
    if i % 15 ==0:
     "FizzBuzz"
    if i % 3 == 0:
      "Fizz"
    if i % 5 == 0:
      "Buzz"
    else:
     total_sum.append(i)
        #リストに加える
print(sum(total_sum))

Submission status: Wrong Answer

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

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

print(sum(list))

Submission status: Wrong Answer

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

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

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

        print(sum(Total))

Submission status: Wrong Answer

Solution code:
i = int(input())
Total = []

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

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

        print(sum(Total))

Submission status: Wrong Answer

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

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

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

        print(sum(Total))

Submission status: Wrong Answer

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

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

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

        print(sum(Total))

Submission status: Wrong Answer

Solution code:
number = int(input())

for i in range(1, number + 1):
    Total = []

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

        print(sum(Total))

Submission status: Wrong Answer

Solution code:
number = int(input())

for i in range(1, 1000000 + 1):
    Total = []

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

        print(sum(Total))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# 1 <= N <= 1000000
N = int(input())

total = []

for x in range(1, N+1):
    if not(x % 15 == 0 or x % 5 == 0 or x % 3 == 0):
        total.append(x)
        print(sum(total))

Submission status: Wrong Answer

Solution code:
# 1 <= N <= 1000000
N = int(input())

total = []

for x in range(1, N+1):
    if not(x % 15 == 0 and x % 5 == 0 and x % 3 == 0):
        total.append(x)
        print(sum(total))

Submission status: Wrong Answer

Solution code:
# 1 <= N <= 1000000
N = int(input())

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


# 和を求める

Submission status: Wrong Answer

Solution code:
N = int(input())
# 1 <= N <= 1000000

for N in range(0, 100001):
    if N % 3 and N % 5 == 0:
        print("FizzBuzz")
    elif N % 3 == 0:
        print("Fizz")
    elif N % 5 == 0:
        print("Buzz")
    else:
        print(N)

# 和を求める

Submission status: Wrong Answer

Solution code:
# 1 <= N <= 1000000
for i in range(1, 10000):
    if i % 3 and i % 5 == 0:
        print("FizzBuzz")
    elif i % 3 == 0:
        print("Fizz")
    elif i % 5 == 0:
        print("Buzz")
    else:
        print(i)

# 和を求める

Submission status: Wrong Answer

Solution code:
# 1 <= N <= 1000000
for i in range(0, 100001):
    if i % 3 and i % 5 == 0:
        print("FizzBuzz")
    elif i % 3 == 0:
        print("Fizz")
    elif i % 5 == 0:
        print("Buzz")
    else:
        print(i)

# 和を求める

Submission status: Wrong Answer

Solution code:
# printを残したままでもできるか。問題は和を求めたい。余計なものはNGになる。

number = int(input())
Total = []

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

print(sum(Total))

Submission status: Wrong Answer

Solution code:
for number in range(1, 30 + 1):
    if (number % 3 == 0) and (number % 5 == 0):
        print('FizzBuzz')
    elif number % 3 == 0:
        print('Fizz')
    elif number % 5 == 0:
        print('Buzz')
    else:
        print(str(number))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

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

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

print(sum)
print(s_3)
print(s_5)
print(s_15)

print(sum - s_3 - s_5 + s_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 += i
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
f=0
for i in range(1,N+1):
    if i %15==0:
        print ("FizzBizz")
    if i%3==0:
        print("Fizz")
    if i%5==0:
        print("Buzz")
    else:
        print(i)
        f=f+i
print(f)

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 % 3 == 0:
        print("Fizz")
    elif i % 5 == 0:
        print("Buzz")
    else:
        print(i)
        sum = sum + i

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

Submission status: Wrong Answer

Solution code:
total = []
N = int(input())
for i in range(N,N+1):
    if i % 3 == 0 and i % 5 == 0:
        pass
    elif i % 5 == 0:
        pass
    else:
        total.append(i)

print(sum(total))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(a)

Submission status: Wrong Answer

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

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

print(a)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

for i in range (1,int(N)+1):
    if i % 15 == 0 :
        a = 'FizzBuzz'
    elif i % 3 == 0:
        a = 'Fizz'
    elif i % 5 == 0:
        a = 'Buzz'
    else:
        b = b + i

Submission status: Wrong Answer

Solution code:
total = []

N = int(input())

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:
        total.append(i)

print(sum(total))

Submission status: Wrong Answer

Solution code:
total = []

N = int(input())

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:
        total.append(i)

print(total)

Submission status: Wrong Answer

Solution code:
total = []

N = int(input())

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:
        total.append(i)
print(sum(total))

Submission status: Wrong Answer

Solution code:
n=int(input())
if n>10**6 or 0>=n:
    pass
else:
    result=0
    for i in range(n):
        if i%3==0 or i%5==0:
            pass
        else:
            result+=i
        
    print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

b=0
n=input()

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

    if i%3==0 and i%5==0:
      a="FizzBuzz"
    elif i%3==0:
        a="Fizz"
    elif i%5==0:
      a="Buzz"
    else:
      b=b+i

print(b)

Submission status: Wrong Answer

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

print(j)

Submission status: Wrong Answer

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

    print(j)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# 数字を取得
N = int(input())

# 数値分ループ
calc = []
for cnt in range(1, N):
    # 3もしくは5の倍数であれば、加算しない
    if cnt % 3 == 0 or cnt % 5 == 0:
        pass
    else:
        calc.append(cnt)

# 合計を出力
print(sum(calc))

Submission status: Wrong Answer

Solution code:
# 数字を取得
N = int(input())

# 数値分ループ
calc = 0
for cnt in range(1,N):
    # 3もしくは5の倍数であれば、加算しない
    if cnt % 3 == 0 or cnt % 5 == 0:
        calc = calc
    else:
        calc = calc + cnt
        
# 合計を出力
print(calc)

Submission status: Wrong Answer

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

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

if __name__ == "__main__":
    n = int(input())
    solve(n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
x=0
for a in range(1,n+1):
  if a%3>0 or a%5>0:
    x=x+a
  else:
    continue
print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(sum(ls))

Submission status: Wrong Answer

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

for i in range(N):
  if i % 3 == 0 and i % 5 == 0:
    ls.append(0)
  elif i % 3 == 0:
    ls.append(0)
  elif i % 5 == 0:
    ls.append(0)
  else:
    ls.append(i)

print(sum(ls))

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:
#!/usr/bin/env python3
def main():
    N = int(input())

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())

l = []
for i in range(N):
    if i % 5 == 0 or i % 3 == 0:
        l.append(0)
    else:
        l.append(i)

print(sum(l))

Submission status: Wrong Answer

Solution code:
n = int(input())

a = []

for i in range(n):
    if (i % 5 == 0) and (i % 3 == 0):
        continue
    elif i % 5==0:
        continue
    elif i % 3 ==0:
        continue
    else:
        a.append(i)
    
ans = sum(a)

print(ans)

Submission status: Wrong Answer

Solution code:

if __name__ == '__main__':
    N = int(input())
    ans = 0
    for i in range(N):
        if i%3 > 0 and i%5 > 0:
            ans += i
    print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
list1 = []
for i in range(N):
  if i%3 ==0 or i%5 ==0:
    list1.append(i)
total1 =0
total2 = 0
for i in list1:
  total1 += i
for i in range(N):
  total2 += i
print(total2 -total1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print(ans)

Submission status: Wrong Answer

Solution code:
ary = list(filter(lambda x: int(x) % 3 != 0 and int(x) % 5 != 0, list(range(int(input())))))
print(sum(ary))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = 0

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

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

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

print(nsum)