Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.Linq;
- using System.Text;
- using System.Threading;
- using System.Threading.Tasks;
- class Program
- {
- static void Main(string[] args)
- {
- int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
- int sum = 0;
- for (int i = 0; i < input.Length; i++)
- {
- int rev = 0;
- while (input[i] > 0)
- {
- int r = input[i] % 10;
- rev = rev * 10 + r;
- input[i] = input[i] / 10;
- }
- sum += rev;
- }
- Console.WriteLine(sum);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement