No.2140 Triangle
レベル :
/ AI推定難易度 : 124
/ 実行時間制限 : 1ケース 2.000秒 / メモリ制限
: 512 MB / 標準ジャッジ問題
タグ : / 解いたユーザー数 238
作問者 :
milkcoffee
/ テスター :
👑
p-adic
nok0
タグ : / 解いたユーザー数 238
作問者 :
milkcoffee
/ テスター :
👑
nok0
問題文最終更新日: 2022-11-24 22:39:16
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 370
(順位表)
の他の問題:
Problem Statement
There are $2$ positive integers $A,B$ satisfying $A \leq B$. How many positive integers $x$ satisfy the following condition?
- There exists a triangle whose $3$ sides have lengths $A,B,x$, respectively.
Note that this problem can be solved without knowing $B$, so only $A$ is given as input.
Input
$A$
- $1 \leq A \leq 10^9$
- $A$ is an integer.
Output
Output the answer as an integer.
Sample
Sample 1
Input
4
Output
7
For example, when $B=4$, $x=1,2,3,4,5,6,7$ satisfy the condition.
Sample 2
Input
1000000000
Output
1999999999
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。