Official
A - box Editorial by kyopro_friends
プログラミングの学習を始めたばかりで何から手をつけるべきかわからない方は、まずは「practicecontest」(https://atcoder.jp/contests/practice/) の問題A「Welcome to AtCoder」をお試しください。言語ごとに解答例が掲載されています。
この問題では、「Welcome to AtCoder」と同様に、\(N\), \(A\), \(B\) の \(3\) つの入力を数値として受け取り、\(N-A+B\) の計算結果を出力すればよいです。
N, A, B = map(int,input().split())
print(N-A+B)
#include <iostream>
using namespace std;
int main(){
int N, A, B;
cin >> N >> A >> B;
cout << N-A+B << endl;
}
#include<stdio.h>
int main(){
int N, A, B;
scanf("%d %d %d", &N, &A, &B);
printf("%d", N-A+B);
}
posted:
last update: