| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 | 2048 MB | 34 | 5 | 3 | 10.345% |
Lina the Magician claims that a common modern computer can easily perform a hundred billion operations per second! To prove it, she proposes to run the following calculations.
Let $V$ be a set of integers, initially empty. We are given the starting value of the integer $s$. Make $n$ steps described below:
How many elements will there be in $V$ after $n$ steps?
Formally: on each step, we count the number of pairs $(a, b)$ where $a \in V,ドル $b \in V,ドル $a \le b$ and $a + b = s$.
The first line contains integers $n$ and $s$ (1ドル \le n \le 200,000円$; 0ドル \le s < 999,983円$; $s \ne 742,681円$).
Print a single integer: the size of set $V$ after $n$ steps.
4 179629
3
In the example, the values of $s$ on the four steps are 740ドル,740円,ドル 139ドル,655円,ドル 469ドル,353円,ドル and 880ドル,395円$.