Hello everyone , i am new to codeforces and as i was solving my first problem "SPREADSHEETS" from codeforces beta round #1 , which is showing wrong_answer in test1 , while in my g++ compiler its giving correct output for that case ...please anyone help....why is this happening??
THIS IS LINK TO MY CODE::::
TEST CASE : 2 R23C55 BC23
ANSWER : BC23 R23C55
ON MY COMPUTER : BC23 R23C55
CODEFORCES SHOWING : BC23 R23C54
Why is codeforces showing 54 instead of 55?








You should forget about pow when you don't really need it. Use your function and the outcome will be WA on test #6.
BTW, can anybody explain why does this happen? Recently, I read a blog about a mistake and I really want to know why...
pow when used, returns a floating point number which is slightly less but very close to the actual answer. So it's always a good idea to do int(ceil(float(pow(x,y)))). Or the best method would be to do fast exponentiation by manually creating your exponentiation function..
Thanks!