Problem: 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.

Submission attempts (in order):
import numpy as np


n = int(input())


def multiples_3(matrix):
    
    m_de = np.delete(fizzbuzz_list,2, axis=1)
    
    f_list = np.zeros(j).reshape(-1, 1)
    
    result = np.concatenate([m_de, f_list], 1)
    return result


j = -(-n // 3)


fizzbuzz_list = np.arange(1,n+1)

before_size = fizzbuzz_list.size

fizzbuzz_list.resize((j,3))


fizzbuzz_list = multiples_3(fizzbuzz_list)


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


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



import numpy as np


n = int(input())


def multiples_3(matrix):
    
    m_de = np.delete(fizzbuzz_list,2, axis=1)
    
    f_list = np.zeros(j).reshape(-1, 1)
    
    result = np.concatenate([m_de, f_list], 1)
    return result


j = -(-n // 3)


fizzbuzz_list = np.arange(1,n+1)

before_size = fizzbuzz_list.size

fizzbuzz_list.resize((j,3))


fizzbuzz_list = multiples_3(fizzbuzz_list)


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


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



import numpy as np


n = int(input())


def element_check(before,after,matirx):
    diff = after - before
    if diff == 1:
        a = np.delete(matirx,-1)
        return a
    if diff == 2:
        a = np.delete(matirx,-1)
        b = np.delete(a,-1)
        return b


def multiples_3(matrix):
    
    m_de = np.delete(fizzbuzz_list, [2, 3], axis=1)
    
    f_list = np.zeros(j,dtype = object).reshape(-1, 1)
    f_list.fill("F")
    
    result = np.concatenate([m_de, f_list], 1)
    return result


j = -(-n // 3)


fizzbuzz_list = np.arange(1,n+1,dtype=object)

before_size = fizzbuzz_list.size

fizzbuzz_list.resize((j,3))


fizzbuzz_list = multiples_3(fizzbuzz_list)


n_b_1 = np.arange(3,j,5)
n_b_2 = np.arange(1,j,5)

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


n_fb = np.arange(4,j,5)
fizzbuzz_list[n_fb,2] = "FB"


result = element_check(before_size,fizzbuzz_list.ravel().size,fizzbuzz_list.ravel())

print(np.sum(result))

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


import numpy as np


n = int(input())


def multiples_3(matrix):
    
    m_de = np.delete(fizzbuzz_list,2, axis=1)
    
    f_list = np.zeros(j).reshape(-1, 1)
    
    result = np.concatenate([m_de, f_list], 1)
    return result


j = -(-n // 3)


fizzbuzz_list = np.arange(1,n+1)

before_size = fizzbuzz_list.size

fizzbuzz_list.resize((j,3))


fizzbuzz_list = multiples_3(fizzbuzz_list)


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


n_fb = np.arange(4,j,5)
fizzbuzz_list[n_fb,2] = 0

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




import numpy as np


n = int(input())


def multiples_3(matrix):
    
    m_de = np.delete(fizzbuzz_list, [2, 3], axis=1)
    
    f_list = np.zeros(j).reshape(-1, 1)
    
    result = np.concatenate([m_de, f_list], 1)
    return result


j = -(-n // 3)


fizzbuzz_list = np.arange(1,n+1)

before_size = fizzbuzz_list.size

fizzbuzz_list.resize((j,3))


fizzbuzz_list = multiples_3(fizzbuzz_list)


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


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



import numpy as np


n = int(input())


def multiples_3(matrix):
    
    m_de = np.delete(fizzbuzz_list,2, axis=1)
    
    f_list = np.zeros(j).reshape(-1, 1)
    
    result = np.concatenate([m_de, f_list], 1)
    return result


j = -(-n // 3)


fizzbuzz_list = np.arange(1,n+1)

before_size = fizzbuzz_list.size

fizzbuzz_list.resize((j,3))


fizzbuzz_list = multiples_3(fizzbuzz_list)


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


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



import numpy as np


n = int(input())


def multiples_3(matrix):
    
    m_de = np.delete(fizzbuzz_list,2, axis=1)
    
    f_list = np.zeros(j).reshape(-1, 1)
    
    result = np.concatenate([m_de, f_list], 1)
    return result


j = -(-n // 3)


fizzbuzz_list = np.arange(1,n+1)

before_size = fizzbuzz_list.size

fizzbuzz_list.resize((j,3))


fizzbuzz_list = multiples_3(fizzbuzz_list)


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


n_fb = np.arange(4,j,5)
fizzbuzz_list[n_fb,2] = 0

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


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Accepted