728x90
풀이
첫 줄에 정수 R1과 S가 주어진다.
S = (R1+R2)/2 다.
우리는 R2를 구해야 한다.
2*S = (R1+R2)
R2 = (2*S)-R1
코드
R1, S = map(int, input().split())
R2 = (2*S)-R1
print(R2)
728x90
'🥧 Python > ⚙️ 코딩테스트' 카테고리의 다른 글
[백준-Python] 11021번: A+B -7 (0) | 2023.02.14 |
---|---|
[백준-Python] 2163번: 초콜릿 자르기 (0) | 2023.02.14 |
[백준-Python] 2588번: 곱셈 (0) | 2023.02.14 |
[백준-Python] 2558번: A+B -2 (0) | 2023.02.14 |
[백준-Python] 10430번: 나머지 (0) | 2023.02.14 |