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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

N = input()
N = int(N)

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

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

print(s_all-fizz-buzz+fb)

Submission status: Runtime Error

Solution code:
N = int(input())
def f(N):
  if N % 5 == 0 and N % 3 == 0:
    return f(N-1)
  elif N % 5 == 0:
    return f(N-1)
  elif N % 3 == 0:
    return f(N-1)
  elif N == 1:
    return 1
  else:
    return f(N-1)+N
print(f(N))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

s=input()
F=list(set(range(0,s)) - set(range(0,s,3))- set(range(0,s,5)))

print(sum(F))

Submission status: Runtime Error

Solution code:
n = list(map(int,input().split()))
x = list()
for i in n
m = i % 3

if m != 0:
  m = i % 5
  else if m != 0:
    x.append(i)

print(sum(x))

Submission status: Runtime Error

Solution code:

#s=input()
F=list(set(range(0,s)) - set(range(0,s,3))- set(range(0,s,5)))

print(sum(F))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x = input()
N = 0

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

Submission status: Runtime Error

Solution code:
s=input()
F=list(set(range(0,s)) - set(range(0,s,3))- set(range(0,s,5)))

print(sum(F))

Submission status: Runtime Error

Solution code:
n = list(map(int,input()))
x = list()
for i in n
m = i % 3

if m != 0:
  m = i % 5
  else if m != 0:
    x.append(i)

print(sum(x))

Submission status: Runtime Error

Solution code:
import itertools
N = int(input())
N_list = [i+1 for i in range(N)]
cumsum = list(itertools.accumulate(N_list))
aa = cumsum[-1]
t_list = [i for i in N_list if i%3 == 0 or i%5 == 0]
acumsum = list(itertools.accumulate(t_list))[-1]
print(aa - acumsum)

Submission status: Runtime Error

Solution code:
N = int(input())

S = N*(N+1)/2

x = N // 15
y = N // 5
z = N // 3

a = 15*x*(x+1)/2
b = 5*y*(y+1)/2
C = 3*z*(z+1)/2

ans = S + a - b - c

print(ans)

Submission status: Runtime Error

Solution code:
import sys, os

if __name__ == '__main__':
    N = input()
    s = 0
    for i in range(1, N+1):
        if i % 3 ==0 or i % 5 ==0:
            continue
        else:
            s += i
    print(s)

Submission status: Runtime Error

Solution code:
import math

x=int256(input())
s=math.floor(x/3)
f=math.floor(x/5)
sf=math.floor(x/15)

s_sum=math.floor(3*s*(s+1)/2)
f_sum=math.floor(5*f*(f+1)/2)
sf_sum=math.floor(15*sf*(sf+1)/2)

sum=s_sum+f_sum-sf_sum
print(math.floor(sum))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys, os

if __name__ == '__main__':
    N = input()
    s = 0
    for i in range(1, N+1):
        if i % 3 ==0 or i % 5 ==0:
            continue
        else:
            s += i
    print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())

in_num  = range(1, N+1)
out_num = [0]
for i in in_num:
    if (i % 3 == 0) and (i % 5 == 0):
        pass
    elif (i % 3 == 0):
        pass
    elif (i % 5 == 0):
        pass
    else:
        out_num.append(i)
 
out_num = np.array(out_num, dtype=np.uint32).sum()
print(out_num)

Submission status: Runtime Error

Solution code:
n = input()
total = 0

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

print(total)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = int(input())
total = 0
while i < a:
  if i %5 != 0 and i %3 != 0:
    total += a
  else:
    continue
print(total)

Submission status: Runtime Error

Solution code:
n = int(input())

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

print(fb)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 12 20:58:59 2020

@author: H_Hoshigi
"""

N = int(input())

FizzBuzz_sum_list = [0,1,3,3,7,7,7,14,22,22,22,33,33,46]
FizzBuzz_num_list = [0,1,2,2,3,3,3,4,5,5,5,6,6,7,8]

answer = 60*pow(N//15, 2) + FizzBuzz_sum_list[N%15] + 15*(N//15)*FizzBuzz_num_list[N%15]

print(answer)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
 
org_sum = 1/2 * N * (N+1)
div3 = N // 3
sum3 = 3/2 * div3 * (div3+1)
div5 = N // 5
sum5 = 5/2 * div5 * (div5+1)
div15 = N // 15
sum15 = 15/2 * div15 * (div15+1)
 
return org_sum - sum3 - sum5 + sum15

Submission status: Runtime Error

Solution code:
a = int(input())
while i < a:
  if i %5 != 0 and i %3 != 0:
    total += a
print(total)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input()
 
org_sum = 1/2 * N * (N+1)
div3 = N // 3
sum3 = 3/2 * div3 * (div3+1)
div5 = N // 5
sum5 = 5/2 * div5 * (div5+1)
div15 = N // 15
sum15 = 15/2 * div15 * (div15+1)
 
return org_sum - sum3 - sum5 + sum15

Submission status: Runtime Error

Solution code:
N = int(input())

total = sum([i for i in range(1,N+1) if i%3!=0 and i%5!=0]
print(total)

Submission status: Runtime Error

Solution code:
n = int(input())
n_lst = []
for i in range(n):
    n_lst.append(i+1)
    
##共通
kosu = n // 15

##3の倍数
a3 = n // 3
lst3 = []
for i in range(a3):
    n3 = 3 * (i+1)
    lst3.append(n3)

##5の倍数
a5 = n // 5
lst5 = []
for i in range(a5):
    n5 = 5 * (i+1)
    lst5.append(n5)

kosu2 = a5 - kosu
    
###リストから取り除く.strip
for i in range(a3):
    n_lst.remove(lst3[i])
for i in range(kosu2):
    n_lst.remove(lst5[i])
    
goke = sum(n_lst)
print(goke)

Submission status: Runtime Error

Solution code:
import numpy as np
#N=map(int, input().split())
N=int(input())
count=0
for i in range(0,N):
    if i%3!=0 and i%5!=0:
        count=long(count+i)
print(count)

Submission status: Runtime Error

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

print(n)

Submission status: Runtime Error

Solution code:
a = int(input())
total=0
while i < a:
  if i %5 != 0 and i %3 != 0:
    total += a
print(total)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input()
Sum = 0

for k in range(N):
    i = k+1

    if i % 3 != 0:
        if i % 5 != 0:
            Sum = Sum + i

print(Sum)

Submission status: Runtime Error

Solution code:
n = input()
 
n = str(n)
  
def FizzBuzzz(p):
  if not p % 3 == 0 or p % 5 == 0:
    return int(p)
  else:
    return 0
 
m = 0
for i in range(0, len(n)):
  m = m + FizzBuzzz(n[-i])
  
  
print(m)

Submission status: Runtime Error

Solution code:
import sys
n = sys.stdin.readline()
t = 0
for i in range(N):
  if i%3 != 0 or i%5 != 0:
    t += i
print(t)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
n = int(sys.stdin.readline())
t = 0
for i in range(N):
  if i%3 != 0 or i%5 != 0:
    t += i
print(t)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input()
 
org_sum = 1/2*N*(N+1)
div3 = N // 3 * 3
div5 = N // 5 * 5
div15 = N // 15 * 15
 
return org_sum - div3 - div5 + div15

Submission status: Runtime Error

Solution code:


N = int(input())

fizzbuzz = []

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

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

Submission status: Runtime Error

Solution code:
a=input()
total=0
while i < a:
  if i %5 != 0 and i %3 != 0:
    total += a
 
	print(total)

Submission status: Runtime Error

Solution code:
a=input()
total=0
while i < a:
  if i %5 != 0 and i %3 != 0:
    total += a

print(total)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input()

org_sum = 1/2*N*(N+1)
div3 = N // 3
div5 = N // 5
div15 = N // 15

return org_sum - div3 - div5 + div15

Submission status: Runtime Error

Solution code:
import sys, os, time, math
import numpy as np
import pandas as pd


print("Start")
# N = 15

# N = list(map(str, input().split()))
# N = np.array(list(map(int, input().split())))
N = list(map(int, input().split()))
N = N[0]
# print(N, K)
print(N)

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

out_num = np.array(out_num, dtype=np.uint32).sum()
print(out_num)

Submission status: Runtime Error

Solution code:
N = input()
Sum = 0

for k in range(N):
    i = k+1

    if i % 3 != 0 and i % 5 != 0:
        Sum = Sum + i

print(Sum)

Submission status: Runtime Error

Solution code:
N = input()

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

Submission status: Runtime Error

Solution code:
N = int(input())
s = 0
for i in range(N):
    if (i%3 == 0)  and (i%5 == 0):
        i = 'FizzBazz
    elif i%3 == 0:
        i = 'Fizz'
    elif i%5 == 0:
        i = 'Bazz'
    else:
        s = s + i
print(s)

Submission status: Runtime Error

Solution code:
s=input()

mod15=s%15

if mod15==0:
	print('FizzBuzz')
else:
    mod3=s%3
    if mod3==0:
        print('Fizz')
    else:
        mod5=s%5
        if mod5==0:
            print('Buzz')
        else:
            print(s)

Submission status: Runtime Error

Solution code:
n = input().split()
 
def FizzBuzzz(p):
  if not p % 3 == 0 or p % 5 == 0:
    return int(p)
  else:
    return 0
 
m = 0
for i in range(0, len(n)):
  m = m + FizzBuzzz(n[i])
  
  
print(m)

Submission status: Runtime Error

Solution code:
s=input()

mod15=s%15



if mod15==0:
	print('FizzBuzz')
else:
    mod3=s%3
    if mod3==0:
        print('Fizz')
    else:
        mod5=s%5
        if mod5==0:
            print('Buzz')
        else:
            print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(K)

Submission status: Runtime Error

Solution code:

import sys
sys.setrecursionlimit(10**6)
N = int(input())

fizzbuzz = []

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input().split()

def FizzBuzzz(p):
  if not p % 3 == 0 or p % 5 == 0:
    return int(p)
  else:
    return 0

m = 0
for i in range(0, len(n)):
  m = m + FizzBuzzz(n[i])
  
  
print(m)

Submission status: Runtime Error

Solution code:
#include<cstdio>
#define ll long long
using namespace std;
 
int main(){
	ll k=0;ll ans=0;
  scanf("%d",&k);
  for(ll i=1;i<k;i++){
    if(k%5==0||k%3==0){continue;}
    else{ans+=i;}
  }
  printf("%d",ans);
  return;
}

Submission status: Runtime Error

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

print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input().split()
n = int(s)
sum = 0
for i range(1,n+1):
  print(n)
  if ((i mod 3 )!=0 ) and ((i mod 5 )!=0 ) :
    sum += i
print(sum)

Submission status: Runtime Error

Solution code:
N = input()
result = 0
for i in range(1,N+1):

    if i%3 != 0 and i%5 != 0:
        result += i

print(result)

Submission status: Runtime Error

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

print(FBSum)

Submission status: Runtime Error

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

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

print(sum(list))

Submission status: Runtime Error

Solution code:
N = int(N)
# N = 1000000
# sum = 0

for i in range(1, N+1) :
    if i % 5 == 0 or i % 3 == 0 :
        continue # it doesn't need to return "Fizz", "Buzz" or "FizzBuzz".
    else :
        sum += i
    # print(i, sum)

print(sum)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(sum(FB))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

sum_ = 0
for i in range(1, n+1):
  if i%15 !=0:
    sum += i
    
print(sum_)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
a = N//3
b = N//5
c = N//15

ans = (N*(N+1)/2) - 3*a(a+1)/2 -5*b(b+1)/2 + 15*c(c+1)/2
print(int(ans))

Submission status: Runtime Error

Solution code:
N = input()
N = int(N)
 
allsum = (N+1)*int(N/2)
 
fum = int(N / 3)
bsum = int(N / 5)
fbsum = int(N / 15)
 
print(allsum-fsum*3-bsum*5+fbsum*15)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <vector>
#include <cstdlib>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <set>
//#include
#include <numeric>
#define pb push_back
#include <queue>
#include <stack>
#include <iomanip>

using namespace std;
void solve(){
    long long n; cin >> n;
    long long i = 1;
    long long su = 0;
    while ( i < n){
        if (i%3 != 0 &&  i%5 != 0){
            su += i;
        }
        i++;
    }
    cout << su << "\n";
}

// Drive program
int main()
{
    solve();

    return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input()
tip = "No"
if (N[0] == 7) or (N[1] == 7) or (N[2] == 7):
  tip = "Yes"
print(tip)

Submission status: Runtime Error

Solution code:
    m = int(input())
     
    def fizz_buzz(i):
      fizz = i % 3
      buzz = i % 5
      
      return (fizz > 0) && (buzz > 1)
     
    res = 0
     
    for i in range(m):
      use_i = i+1
      if fizz_buzz(use_i):
        res += use_i
        
    print(res)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
S=N//15
R=S-1
A=60+15*8*R
T=(60+A)*S//2
M=N-15*S
P=[1,2,4,7,8,11,13,14]
P1=[]
for u in P:
    P1.append(u+15*R)

B=0
for i in range(M):
    B=B+P1[i]

print(B+T)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = map(int, input().split())
# M=1
# A=[5,4,2,1]

cnt = 0
cnt1 = 0

# for i in range(N):
#     cnt = cnt + A[i]
#
# for i in range(N):
#     if A[i] / cnt > 1 / 4 / M:
#         cnt1 = cnt1 + 1

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

# a1 = N % 10
# a2 = ((N-a1*10) % 100)/10
# a3 = ((N-a1*100-a2*10))/100

print(sum)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
l = 1
li = []
while l < n+1:
  if l % 3 == 0 and l % 5 == 0 or l % 3 == 0 or l % 5 == 0:
    li.append(l)
    l+=1
  else:
    li+=1

print(li)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=int(input())

def sum30:
  return (1+2+4+7+8+11+13+14+16+17+19+22+23+26+28+29)

def sumx(x):
  ret = 0
  for j in range(1,x):
    if(j%3 != 0 and j%5 != 0):
      ret+=j
  return ret

sum=0
i=1
while(a > 30):
  sum+=i*sum30
  i+=1
  a-=30
sum+=sumx(a)
    
print(sum)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
list = []
i = int(input())
if i%3 != 0 or i%5 != 0:
  list.add(i)
print(sum(list))

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
import sys
                                                                                                                                                                                                                                                                      def solve(N: int):                                                                                                                     ans=0
    for i in range(N):
        ans+=i if i%3!=0 and i%5!=0 else 0
    print(ans)                                                                                                                         return                                                                                                                                                                                                                                                                                                                                                                                               # Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools
def main():
    def iterate_tokens():                                                                                                                  for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
N = int(input())
ans = 0
for i in range(N):
  if N % 3 == 0 and N % 5 == 0:
    ans -= i
  elif N % 3 == 0 and N % 5 != 0 or N % 3 != 0 and N % 5 == 0:
    ans += i
  else:
    pass
print(((N+1)*N)//2-a)

Submission status: Runtime Error

Solution code:
import copy
n=int(input())
a=[]
b=[]
c=[]
d=[]
for i in range(n):
  a.append(i+1)
for i in range(n):
  if 3*i+2>n:
    break
  else:
    b.append(a[3*i+2])
for i in range(n):
  if 5*i+4>n:
    break
  else:
    c.append(a[5*i+4])
for i in range(n):
  if 15*i+14>n:
    break
  else:
    d.append(a[15*i+14])
print(sum(a)-sum(b)-sum(c)+sum(d))

Submission status: Runtime Error

Solution code:
import sys

X = input()
count = 0
for num in range(X):
  if not num % 3 == 0 or num % 5 == 0:
    count = count + num
print(count)

Submission status: Runtime Error

Solution code:
n = int(input())
l = 1
li = []
while l < n+1:
  if l % 3 == 0 and l % 5 == 0 or l % 3 == 0 or l % 5 == 0:
    li.append(l)
    l+=1
  else:
    li+-1

print(li)

Submission status: Runtime Error

Solution code:
n = int(input())
l = [i for i in range(1,n+1)]
l = list(filter(lambda x: x%3 != 0,l))
l = list(filter(lambda x; x%5 != 0,l))
print(sum(l))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input()
Sum = 0

for k in range(N):
    i = k+1

    if i % 3 != 0 and i % 5 != 0:
        Sum = Sum + i

print(str(Sum))

Submission status: Runtime Error

Solution code:

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())

S = N*(N+1)/2

x = N // 15
y = N // 5
z = N // 3

a = 15*x(x+1)/2
b = 5*y(y+1)/2
C = 3*z(z+1)/2

ans = S + a - b - c

print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())

_sum = N * (1+N)/2

if N >= 3:
  _min = 3
  _max = 3 * (N // 3)
  num = (_max - _min) / 3 + 1
_sum -= num*(_min+_max)/2

if N >= 5:
  _min = 5
  _max = 5 * (N // 5)
  num = (_max - _min) / 5 + 1
_sum -= num*(_min+_max)/2

if N >= 15:
  _min = 15
  _max = 15 * (N // 15)
  num = (_max - _min) / 15 + 1
  _sum += num*(_min+_max)/2

print(int(_sum))

Submission status: Runtime Error

Solution code:
n = int(raw_input())
zen = n * (n +1) /2


fn = int(n/3)
f = 3 * fn * (fn +1)/2

bn = int(n/5)
b = 5 * bn * (bn +1)/2

fbn = int(n/15)
fb = 15 * fbn * (fbn + 1) /2

print (zen - (f + b - fb))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

print(m)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
m = n//15
l = n%15
x = 60*(m**2)
y = [0,1,2,0,4,0,0,7,8,0,0,11,0,13,14,0]
for i in range(1,l+1):
    if(y[i] != 0):
        x += y[i]+m*15
print(x)a

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include<iostream>
using namespace std;
int main(void){
  long long int val=0;
  cin >> val;
  
  long long int sum=0;
  for(long long int i=0;i<=val;i++){
  	if(val % 15 == 0){
  	}
  	else if(val % 3 ==0  && val % 5 != 0){ 
  	}
  	else if(val % 3 != 0 && val % 5 == 0){
  	}
  	else{
      sum+= i;
    }
  }
  cout << sum << endl;
  
  return 0; 
}

Submission status: Runtime Error

Solution code:
import sys
n = int（sys.stdin.readline())
t = 0
for i in range(N):
  if i%3 != 0 or i%5 != 0:
    t += i
print(t)

Submission status: Runtime Error

Solution code:
import sys

n = int(sys.argv[1])
total = 0

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

print(total)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
n3=n//3
s3=((n3)*3)(n3+1)//2
n5=n//5
s5=((n5)*5)(n5+1)//2
n15=n//15
s15=((n15)*15)(n15+1)//2

s=n*(n+1)//2
s=s-s3-s5+s15
print(s)

Submission status: Runtime Error

Solution code:
s = input().split()
n = int(s)
sum = 0
for i range(1:n+1):
  #print(n)
  if ((i mod 3 )!=0 ) and ((i mod 5 )!=0 ) :
    sum += i
print(sum)

Submission status: Runtime Error

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

print(a)

Submission status: Runtime Error

Solution code:
import math
Nstring=int(input())
ans=(N*(N+1))/2
ans=ans-math.floor(N/3)
ans=ans-math.floor(N/5)
ans=ans+math.floor(N/15)
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
n1 = n // 15
n2 = n % 15
n3 = [0, 1, 3, 3, 7, 7, 7, 14, 22, 22, 22, 33, 46, 60]
ans = 60 * (n1 ** 2) + n3[n2] + 15 * n1 * (n2 - n2 // 3 - n2 // 5)
print(ans)

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using ul = unsigned long long;
using ld = long double;

#define pb push_back
#define mp make_pair

int main()
{
    ios_base::sync_with_stdio(false); cin.tie(NULL);
    int n; cin >> n;
    ll sum = 0; 
    for (int i=1; i<n; i++) {
       if (i%3==0 or i%5==0) continue;
       sum += i;
    }
    cout << sum << endl;

    return 0;
}

Submission status: Runtime Error

Solution code:
n = int(input())

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

Submission status: Runtime Error

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

print(count)

Submission status: Runtime Error

Solution code:
n = input()
i = 1
result = 0
while (i <= n):
  if (i % 3 == 0 || i % 5 == 0):
    result += i
print(result)

Submission status: Runtime Error

Solution code:
def main():
    N = input()
    sum = 0
    for i in range(N):
        i = i+1
        if i%3 ==0 or i%5 ==0 or i%15 ==0:
            continue
        else:
            sum = sum + i

    print(sum)




if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
ln = [i for i in range(1,N+1)]
for i in range(N):
  if ln[i] % 3 == 0:
    nl.pop(i)
  elif ln[i] % 5 == 0:
    nl.pop(i)
  elif ln[i] % 15 == 0:
    nl.pop(i)
print(sum(nl))

Submission status: Runtime Error

Solution code:
n = int(input())

sum_ = 0
for i in range(1, n+1):
  if n%15 !=0:
    sum += i
    
print(sum_)