C# (Visual C# Interactive Compiler), (削除) 180 (削除ここまで) 171(削除) 171 (削除ここまで) 168 bytes
n=>{for(int i=1,p;i<5001;){p=i;varvar j=new Stack<int>();for(;p>0;pp=i;p>0;p/=n)j.Push(p%n);var s=i%s=i%~(n/2+12)<1?"Fizz":"";Print(i++%((n+8n+11)/3+13)<1?s+"Buzz":s==""?string.Join("-",j):s);}}
Outputs like Arnauld's answer. Thanks to digEmAll for the idea of using a stack to reverse the output.
Try it online! Saved 3 bytes thanks to ceilingcat
C# (Visual C# Interactive Compiler), (削除) 180 (削除ここまで) 171 bytes
n=>{for(int i=1,p;i<5001;){p=i;var j=new Stack<int>();for(;p>0;p/=n)j.Push(p%n);var s=i%(n/2+1)<1?"Fizz":"";Print(i++%((n+8)/3+1)<1?s+"Buzz":s==""?string.Join("-",j):s);}}
Outputs like Arnauld's answer. Thanks to digEmAll for the idea of using a stack to reverse the output.
C# (Visual C# Interactive Compiler), (削除) 180 (削除ここまで) (削除) 171 (削除ここまで) 168 bytes
n=>{for(int i=1,p;i<5001;){var j=new Stack<int>();for(p=i;p>0;p/=n)j.Push(p%n);var s=i%~(n/2)<1?"Fizz":"";Print(i++%((n+11)/3)<1?s+"Buzz":s==""?string.Join("-",j):s);}}
Outputs like Arnauld's answer. Thanks to digEmAll for the idea of using a stack to reverse the output.
Saved 3 bytes thanks to ceilingcat
C# (Visual C# Interactive Compiler), 180(削除) 180 (削除ここまで) 171 bytes
n=>{for(int i=1,p;i<5001;){p=i;var s="";var j=new Stack<int>();while;for(p>0;p>0;p/=n)j.Push(p-(p/=n)*np%n);s+=i%;var s=i%(n/2+1)<1?"Fizz":"";Print(i++%((n+8)/3+1)<1?s+"Buzz":s==""?string.Join("-",j):s);}}
Outputs like Arnauld's answer. Thanks to digEmAll for the idea of using a stack to reverse the output.
C# (Visual C# Interactive Compiler), 180 bytes
n=>{for(int i=1,p;i<5001;){p=i;var s="";var j=new Stack<int>();while(p>0)j.Push(p-(p/=n)*n);s+=i%(n/2+1)<1?"Fizz":"";Print(i++%((n+8)/3+1)<1?s+"Buzz":s==""?string.Join("-",j):s);}}
Outputs like Arnauld's answer. Thanks to digEmAll for the idea of using a stack to reverse the output.
C# (Visual C# Interactive Compiler), (削除) 180 (削除ここまで) 171 bytes
n=>{for(int i=1,p;i<5001;){p=i;var j=new Stack<int>();for(;p>0;p/=n)j.Push(p%n);var s=i%(n/2+1)<1?"Fizz":"";Print(i++%((n+8)/3+1)<1?s+"Buzz":s==""?string.Join("-",j):s);}}
Outputs like Arnauld's answer. Thanks to digEmAll for the idea of using a stack to reverse the output.
C# (Visual C# Interactive Compiler), 180 bytes
n=>{for(int i=1,p;i<5001;){p=i;var s="";var j=new Stack<int>();while(p>0)j.Push(p-(p/=n)*n);s+=i%(n/2+1)<1?"Fizz":"";Print(i++%((n+8)/3+1)<1?s+"Buzz":s==""?string.Join("-",j):s);}}
Outputs just like ArnauldArnauld's answer. Thanks to digEmAll for the idea of using a stack to reverse the output.
C# (Visual C# Interactive Compiler), 180 bytes
n=>{for(int i=1,p;i<5001;){p=i;var s="";var j=new Stack<int>();while(p>0)j.Push(p-(p/=n)*n);s+=i%(n/2+1)<1?"Fizz":"";Print(i++%((n+8)/3+1)<1?s+"Buzz":s==""?string.Join("-",j):s);}}
Outputs just like Arnauld. Thanks to digEmAll for the idea of using a stack to reverse.
C# (Visual C# Interactive Compiler), 180 bytes
n=>{for(int i=1,p;i<5001;){p=i;var s="";var j=new Stack<int>();while(p>0)j.Push(p-(p/=n)*n);s+=i%(n/2+1)<1?"Fizz":"";Print(i++%((n+8)/3+1)<1?s+"Buzz":s==""?string.Join("-",j):s);}}
Outputs like Arnauld's answer. Thanks to digEmAll for the idea of using a stack to reverse the output.