Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- class LettersSymbolsNumbers
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- int letters = 0;
- int numbers = 0;
- int symbols = 0;
- string input = string.Empty;
- for (int i = 0; i < n; i++)
- {
- input += string.Join("", Console.ReadLine().ToUpper().Split(new char[] { ' ', '\t', '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries));
- }
- foreach (char s in input)
- {
- if (s >= 'A' && s <= 'Z')
- {
- letters += ((int)s - 64)*10;
- }
- else if (s >= '0' && s <= '9')
- {
- numbers += (int)char.GetNumericValue(s)*20;
- }
- else
- {
- symbols += 200;
- }
- }
- Console.WriteLine(letters);
- Console.WriteLine(numbers);
- Console.WriteLine(symbols);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement