시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 256 MB | 56 | 35 | 26 | 63.415% |
You might be familiar with the binomial coefficient \(\binom{m}{k}\) defined as \(\binom{m}{k} = \frac{m!}{k!(m-k)!}\), where \(m\) and \(k\) are non-negative integers and \(k \le m\). Let \(T_2\left(n\right)\) be the number of odd binomial coefficients such that \(0 \le k \le m < n \). The most useful mathematical inequality you will learn during this competition is
\[0.812556n^{\log_2{3}} \le T_2\left(n\right) \le n^{\log_2{3}}\]
Emma doesn’t like such imprecise inequalities and would like to calculate \(T_2\left(n\right)\) exactly. Can you help her?
The input contains one line with one integer \(n\), \(1 \le n \le 10^{11}\).
Output one line with the value of \(T_2\left(n\right)\).
4
9
6
15
Contest > KTH Challenge > KTH Challenge 2015 H번