How to be sure about efficiency

hello
in this question my code is correct but before submitting and verifying approach on editorial I was doubtful that optimization might be possible. How would you tackle this situation ?

Also shall I use nested if-else as might be the first ‘or’ -> true so no need to check others , or is it fine ?

https://codeforces.com/problemset/problem/271/A

hello @prerak_semwal

you should read about time and space complexity analysis.
and apply that on every problem to get efficiency .

its fine.

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.