Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Numerics;
- using System.Text;
- using System.Text.RegularExpressions;
- namespace HomeWork
- {
- class Program
- {
- static void Main()
- {
- var strs = Regex.Split(Console.ReadLine(), @"\W+");
- var str1 = strs[0];
- var str2 = strs[1];
- long sum = 0;
- for (int i = 0; i < Math.Max(str1.Length, str2.Length); i++)
- {
- long num1 = 1, num2 = 1;
- if (i < str1.Length) num1 = str1[i];
- if (i < str2.Length) num2 = str2[i];
- sum += num1 * num2;
- }
- Console.WriteLine(sum);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement