AtCoder Beginner Contest 076: A - Rating Goal date: 2017-12-08 see also: https://beta.atcoder.jp/contests/abc076/tasks/abc076_a solution $\mathrm{ans} = 2G - R$。$O(1)$。 implementation #!/usr/bin/perl print-<>+2*<>