please check:
my code works fine for small inputs but fails for larger intput values
Code failing for larger input
hello @Garvit012
I have check ur code ,it looks correct.
change int datatype to long long and submit again it should work.
it is working now…thankyou
by the way ideally which all variables should be long long int in the ques?
i have checked the range for n and values of boards…they can be put in int
bro jis question mein bhi modulo me answer maange un sab me aankh band karke long long laga dena.
reason is to avoid overflow.
ha but saare variables ko long long krenge toh extra space waste hoga limits dekhkr kuchh value ko int me krwa lete h
iss ques mei kis kis ko int mei daal skte h?
ha long long space thoda jayda lega .
yaha pe tum n aur k to int rakh sakte ho. baaki sab to long long me hi rehne do.
ohkk thanks a lot sir
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.