Python Fundamentals - 04. Sum of chars
Здравейте, решавам 4та задача от 9то упражнение със следното условие:
Write a program, which sums the ASCII codes of n characters and prints the sum on the console.
Input
- On the first line, you will receive n – the number of lines, which will follow
- On the next n lines – you will receive letters from the Latin alphabet
Output
Print the total sum in the following format:
The sum equals: {total_sum}
Constraints
- n will be in the interval [1…20].
- The characters will always be either upper or lower-case letters from the English alphabet
- You will always receive one letter per line
Examples
Input |
Output |
|
Input |
Output |
5 A b C d E |
The sum equals: 399 |
|
12 S o f t U n i R u l z z |
The sum equals: 1263 |
Ето го и моето решение, когато го изпробвам работи, но като го кача в Judge, ми дава грешки и не ги описва. Може ли някой да даде някой друг съвет ? https://pastebin.com/ycFL2psq