Can someone mediocre at math do well as a CS major?

I’m not excellent at math. I’m well above average, but I’m aiming for a top-tier university and I struggle with subjects like calculus-heavy physics. However, I really love programming and am fairly good at it. Do I have a good chance at getting a BA in CS? Is CS more programming or more calculus (compared to EE or CE)? Thanks!

Not all colleges’ CS majors require physics.

A CS major will likely have to take the following math or essentially-like-math courses:

calculus 1
calculus 2
linear algebra (and differential equations if combined)
discrete math
algorithms and complexity

The latter two tend to be proof-heavy.

If the CS major is engineering based, the following additional courses are likely to be required:

multivariable calculus
calculus-based physics (two semesters including mechanics, electromagnetism, and perhaps other topics)

In addition, the ability to think mathematically and logically tends to be similar to the type of thinking one does in other CS courses.

Anyone can perform anything/learn you just have to put in the work to improve yourself

Sure. I knew someone that failed Calculus 5 times and when he finally passed he was able to get his degree in CS.