Official

A - box Editorial by evima


If you have just started studying programming and have no idea where to start, we recommend you to try Problem A “Welcome to AtCoder” from the “practicecontest” (https://atcoder.jp/contests/practice/) first. You can find a sample code for each language there.

In this problem, you are asked to receive three inputs, \(N\), \(A\) and \(B\), as numbers, just like the “Welcome to Atcoder”, and then output the result of \(N-A+B\).

Sample Code (Python)

N, A, B = map(int,input().split())
print(N-A+B)

Sample Code (C++)

#include <iostream>
using namespace std;

int main(){
	int N, A, B;
	cin >> N >> A >> B;
	cout << N-A+B << endl;
}

Sample Code (C)

#include<stdio.h>

int main(){
	int N, A, B;
	scanf("%d %d %d", &N, &A, &B);
	printf("%d", N-A+B);
}

posted:
last update: