12/13 水题 class Solution { public int numberOfMatches(int n) { int ans=0; while(n!=1){ ans+=n/2; n=(n+1)/2; } return ans; } }