Hello Codeforces community ! Suppose I have declared a variable long cnt=0;
//then I wish to do cnt+=Math.pow(2,59);
//And again I do cnt+=Math.pow(2,3);
Ideally now value should be cnt + 8 but value output by compiler is still cnt i.e. 8 is notincremented but if I parse that second statement somewhat like
cnt+=(long)Math.pow(2,3); I am getting the desired answer .Would someone mind explaining it what'sthe difference here! Any help will be appreciated ! Thanx !.