Skip to content

Last Digit Sum

A1300
English

Language

Contribute a translation
Time limit
1000 ms
Memory limit
256 MB
Submissions
3
Correct
3
Solved by
3
AC rate
100.000%

Statement

You are given two positive integers $A$ and $B$.

Add the last digit of $A$ and the last digit of $B$, then print the result.

Input

The first line contains two integers $A$ and $B$. ($1 \le A, B \le 1\,000\,000$)

Output

Print one integer: the sum of the last digits of $A$ and $B$.

Examples

Sample input 1
123 456
Sample output 1
9
The last digit of $123$ is $3$. The last digit of $456$ is $6$. Their sum is $9$.
Sample input 2
90 17
Sample output 2
7

Tags

No tags yet

In these problemsets