Official
A - Happy New Year 2025 Editorial by en_translator
If you are new to learning programming and do not know where to start, please try Problem A “Welcome to AtCoder” from practice contest. There you can find a sample code for each language.
Also, if you are not familiar with problems in programming contests, we recommend you to try some problems in “AtCoder Beginners Selection” (https://atcoder.jp/contests/abs).
Happy new year!
This problem asks a simple input/output and arithmetic operations.
Implement the following process in your favorite programming language:
- receive integers \(A\) and \(B\) as input,
- compute \((A+B)\times(A+B)\), and
- print the result.
Refer to the following sample code in C++ and Python.
Sample code (C++):
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout << (a + b) * (a + b) << endl;
}
Sample code (Python) :
a, b = map(int, input().split())
print((a + b) * (a + b))
posted:
last update: