Given an integer n, return a string array answer (1-indexed) where:


	answer[i] == "FizzBuzz" if i is divisible by 3 and 5.
	answer[i] == "Fizz" if i is divisible by 3.
	answer[i] == "Buzz" if i is divisible by 5.
	answer[i] == i (as a string) if none of the above conditions are true.


&nbsp;
Example 1:
Input: n = 3
Output: ["1","2","Fizz"]
Example 2:
Input: n = 5
Output: ["1","2","Fizz","4","Buzz"]
Example 3:
Input: n = 15
Output: ["1","2","Fizz","4","Buzz","Fizz","7","8","Fizz","Buzz","11","Fizz","13","14","FizzBuzz"]

&nbsp;
Constraints:


	1 &lt;= n &lt;= 104


class Solution:
    def fizzBuzz(self, n: int) -> List[str]:
        result = []
        for i in range(1, n+1):
            if i % 3 == 0 and i % 5 == 0:
                result.append('FizzBuzz')
            elif i % 3 == 0:
                result.append('Fizz')
            elif i % 5 == 0:
                result.append('Buzz')
            else:
                result.append(str(i))
        return result
class Solution {
    public List<String> fizzBuzz(int n) {
        List<String> l=new ArrayList<>();
        
        for(int i=1,fizz=0,buzz=0;i<=n;i++)
        {
            fizz++;
            buzz++;
            
            if(fizz==3 && buzz==5)
            {
                l.add("FizzBuzz");
                fizz=0;
                buzz=0;
            }
            else if(fizz==3)
            {
                l.add("Fizz");
                fizz=0;
            }
            else if(buzz==5)
            {
                l.add("Buzz");
                buzz=0;
            }
            else{
                l.add(String.valueOf(i));
            }
        }
        return l;
    }
}
class Solution {
public:
    vector<string> fizzBuzz(int n) {
        vector<string> ans;
        string hehe;
        for (int i = 1; i <= n; i++) {
            if (i % 3 == 0 and i % 5 == 0) hehe += "FizzBuzz";
            else if (i % 3 == 0) hehe += "Fizz";
            else if (i % 5 == 0) hehe += "Buzz";
            else hehe = to_string(i);
            ans.push_back(hehe);
            hehe = "";
        }
        return ans;
    }
};
	/**
 * @param {number} n
 * @return {string[]}
 */
var fizzBuzz = function(n) {
	 let arr = []
	for (let i = 1; i <= n; i++){
		if(i % 3 == 0 && i % 5 == 0){
			arr[i-1] = "FizzBuzz"
		}else if(i % 3 == 0 && i % 5 != 0){
			arr[i-1] = "Fizz"
		}else if(i % 3 != 0 && i % 5 == 0){
			arr[i-1] = "Buzz"
		}else{
			arr[i-1] = String(i)
		}
	}
	return arr  
};
Fizz Buzz