AtCoder Beginner Contest 078
C
HSI
AtCoder
⌀ 752
原题
← BD →
翻译中…

Problem Statement

翻译中…

Takahashi is now competing in a programming contest, but he received TLE in a problem where the answer is YES or NO.

翻译中…

When he checked the detailed status of the submission, there were $N$ test cases in the problem, and the code received TLE in $M$ of those cases.

翻译中…

Then, he rewrote the code to correctly solve each of those $M$ cases with $1/2$ probability in $1900$ milliseconds, and correctly solve each of the other $N-M$ cases without fail in $100$ milliseconds.

翻译中…

Now, he goes through the following process:

翻译中…
  • Submit the code.
  • Wait until the code finishes execution on all the cases.
  • If the code fails to correctly solve some of the $M$ cases, submit it again.
  • Repeat until the code correctly solve all the cases in one submission.
翻译中…

Let the expected value of the total execution time of the code be $X$ milliseconds. Print $X$ (as an integer).

翻译中…

Constraints

翻译中…
  • All input values are integers.
  • $1 \leq N \leq 100$
  • $1 \leq M \leq {\rm min}(N, 5)$
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

N M

翻译中…

Output

翻译中…

Print $X$, the expected value of the total execution time of the code, as an integer. It can be proved that, under the constraints in this problem, $X$ is an integer not exceeding $10^9$.

翻译中…

样例

Input #1
1 1
Output #1
3800
In this input, there is only one case. Takahashi will repeatedly submit the code that correctly solves this case with $1/2$ probability in $1900$ milliseconds. The code will succeed in one attempt with $1/2$ probability, in two attempts with $1/4$ probability, and in three attempts with $1/8$ probability, and so on. Thus, the answer is $1900 \times 1/2 + (2 \times 1900) \times 1/4 + (3 \times 1900) \times 1/8 + ... = 3800$.
Input #2
10 2
Output #2
18400
The code will take $1900$ milliseconds in each of the $2$ cases, and $100$ milliseconds in each of the $10-2=8$ cases. The probability of the code correctly solving all the cases is $1/2 \times 1/2 = 1/4$.
Input #3
100 5
Output #3
608000
题目信息
题号
arc085_a
时间限制
2 s
内存限制
256 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。