COCI00007
R2
레이팅
의견: 0
설명
The number \(C\) is called the mean of two numbers \(R_1\) and \(R_2\) if \(S\) is equal to \(\frac{R_1+R_2}{2}\). Mirko's birthday present for Slavko was two integers \(R_1\) and \(R_2\). Slavko promptly calculated their mean, which also happened to be an integer, but then lost \(R_2\)! Help Slavko restore \(R_2\).
제약
입력 형식
The first and only line of input contains two integers \(R_1\) and \(S\), both between \(1\) and \(1000\) — \(R_1\) is the number Slavko still has, and \(S\) is the mean he computed.
출력 형식
Output \(R_2\) on a single line.
서브태스크
| 서브태스크 | 점수 | 설명 |
|---|---|---|
Subtask 1 | 10점 |
예제 1
입력
11 15출력
19예제 2
입력
4 3출력
2문제 정보
태그
평가 및 의견
R2
개요
Log in to rate problems.
개별 의견
아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.
풀이 제출
R2
게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다.
로그인하고 제출하기