SODUJ - Sum of Digits
You are given n natural numbers a1, a2, a3 ... an. Let SOD of a number be defined as the Sum of Digits of that number. Compute the value of
{ [ SOD(a1) + SOD(a2) + ... SOD(an) ] % 9 } – { [ SOD( a1 + a2 + ... an ) ] % 9 }
Input
The first line consists of the value of n. Next n lines are such that the ith line consists of a single natural number ai.
Output
Print a single line consisting of the computed value.
Constraints
2 <= n <= 100000
1 <= ai <= 10^100000
Example
Input: 3
1
2
3 Output: 0
Added by: | Ujjawal Dixit |
Date: | 2014-09-30 |
Time limit: | 0.5s-1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |