Open conchincradle opened 2 years ago
Java Math.pow(), is double
for integer, maybe (int )
and for 2^n
we can use 1<<n; represent 2^n
(int )Math.pow(10,3)
ones, tens, hundreds num/1000, (num%1000)/100,(num%100)/10,num%10 分别是千位百位十位个位的数字
int incre = hashmap.get(curr)<hashmap.get(right)?-hashmap.get(curr):hashmap.get(curr); sum += incre;
数学