Does input and output statements to be considered for Time Cmplexity

For example, I’m just taking n square inputs for a nXn matrix and not performing any other operation in my code/program. So, will the time complexity be O(n^2) ?

or we just consider time complexity if we perform any operation like getting sum of all values while taking the input ???

Hello @Bhavuk_09 input and ouput operation dont contribute to time complexity.
because they are done in O(1) time.
Happy Learning!!

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.