请注意比较:
I had a really hard time with science.
==I had a really hard time (in) learning / studying science.