I tried to solve this problem but for some reason the C++ compiler calculates power of 26 raised to 1 as 25 and I am getting wrong answer! Here is the submission link. http://codeforces.me/contest/1/submission/14859704 Any corrections to the code are appreciated. Also, if there are any internal compiler error, please let me know!