#include <iostream>
#include <vector>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
vector<int> Input(5);
cin >> Input[0] >> Input[1] >> Input[2] >> Input[3] >> Input[4];
int Sum = 0;
for (size_t i = 0; i < 5; i++)
{
Input[i] *= Input[i];
Sum += Input[i];
}
cout << Sum % 10 << "\n";
return 0;
}
'CodingTest > Baekjoon' 카테고리의 다른 글
[Baekjoon] 30802번 웰컴 키트 (0) | 2025.02.10 |
---|---|
[Baekjoon] 4153번 직각삼각형 (0) | 2025.02.10 |
[Baekjoon] 2741번 N 찍기 (0) | 2025.02.09 |
[Baekjoon] 10250번 ACM 호텔 (0) | 2025.02.09 |
[Baekjoon] 2577번 숫자의 개수 (0) | 2025.02.09 |