Link to my code: https://mirror.codeforces.com/contest/1335/submission/86206704
O/P on other IDE's 254873296 386492714 729641735 853725149 975324628 412968347 632457982 598235471 247189562
But on codeforces I am getting two weird outputs.In one O/P I am getting just blank spaces while in other O/P I am getting correct output but with no line break; (published)