PS_Baekjoon
[백준 C++] 6749번 : Next in line
SMILELY
2023. 4. 27. 16:25
https://www.acmicpc.net/problem/6749
6749번: Next in line
You know a family with three children. Their ages form an arithmetic sequence: the difference in ages between the middle child and youngest child is the same as the difference in ages between the oldest child and the middle child. For example, their ages c
www.acmicpc.net
코드 :
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
int a, b;
cin >> a >> b;
cout << b + (b-a) << '\n';
}