# [1688. Count of Matches in Tournament](https://leetcode.com/problems/count-of-matches-in-tournament/)   int numberOfMatches(int n){ int round=0; int sum=0; while(round!=1) { if(n%2==0) { round=n/2; } else if(n%2!=0) { round=(n/2)+1; } sum=sum+(n/2); n=round; } return sum; }
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up