Problem:
Counting Characters Write a program which counts and reports the number of each alphabetical letter. Ignore the case of characters. Input A sentence in English is given in several lines. Output Prints the number of alphabetical letters in the following format: a : The number of 'a' b : The number of 'b' c : The number of 'c' .
  .
z : The number of 'z'  Constraints  The number of characters in the sentence < 1200  Sample Input This is a pen. Sample Output a : 1
b : 0
c : 0
d : 0
e : 1
f : 0
g : 0
h : 1
i : 2
j : 0
k : 0
l : 0
m : 0
n : 1
o : 0
p : 1
q : 0
r : 0
s : 2
t : 1
u : 0
v : 0
w : 0
x : 0
y : 0
z : 0

Solution (Python):



n = open(0)
n = n.read()
l1 = "abcdefghijklmnopqrstuvwxyz"
l2 = [0]*26

for i in n:
   for j in range(len(l1)):
      if i == l1[j] or i == l1[j].upper():
         l2[j] += 1

for i in range(len(l1)):
   print(l1[i], ":", l2[i])

Solution (Python):
a = []
while True:
    try:
        n = input()
        n1 = n.lower()
        v = list(n1)
        a += v
    except:
        break
b = len(a)
d = []
for i in range(b):
        c = ord(a[i])
        d.append(c)
for k in range(97,123):
    e = d.count(k)
    if e == 0:
        print(f'{chr(k)} : 0')
    else:
        print(f'{chr(k)} : {e}')

Solution (Python):
import sys
alphabet = 'abcdefghijklmnopqrstuvwxyz'
result = {}


def check(judge):
    global result
    for i in judge:
            x = i.lower()
            if x in alphabet:
                result[x] += 1

for i in alphabet:
    result[i] = 0

judge = sys.stdin.read()
check(judge)
   
for k, v in result.items():
    print('{} : {}'.format(k, v))

Solution (Python):
import sys

letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
table = [0 for i in range(26)]

input_str = sys.stdin.read()

for i in input_str:
    index = 0
    for j in letters:
        
        if i == j:
            table[index % 26] += 1
        index += 1

for i in range(26):
    print(f"{letters[i]} : {table[i]}")

Solution (Python):
from string import ascii_lowercase

d = {i: 0 for i in ascii_lowercase}

while True:
    try:
        s = input()
    except:
        break

    for i in s.lower():
        if i in ascii_lowercase:
            if i in d.keys():
                d[i] += 1

for k, v in d.items():
    print('{} : {}'.format(k, v))

Solution (Python):
t=[]
alphabet={}
alphabet=dict.fromkeys(list("abcdefghijklmnopqrstuvwxyz"),0)
while True:
    try:
        word=str(input())
        a=str.lower(word)
        t.append(a)
    except EOFError:
        break
t.sort()

for w in t:
    for c in w:
        try:
            alphabet[c] +=1
        except KeyError:
            pass
for k, v in alphabet.items():
    print(f'{k} : {v}')

Solution (Python):
import string
from collections import Counter

lines = ''
try:
    while True:
        s = input()
        lines += s.lower()
except:
    ans = Counter([c for c in lines if c.isalpha()])

    for k in string.ascii_lowercase:
        if k in ans:
            print(f'{k} : {ans[k]}')
        else:
            print(f'{k} : 0')

Solution (Python):
import sys
import string

count = {k : 0 for k in string.ascii_lowercase}
for c in sys.stdin.read().lower():
    if c.islower():
        count[c] += 1
for k, v in count.items():
    print(f"{k} : {v}")

Solution (Python):
import sys
cnts = {}
for line in sys.stdin:
    for c in list(line.lower()): 
        cnts[c] = cnts.get(c,0) + 1
for c in range(ord('a'),ord('z')+1):
    print(chr(c),':',cnts.get(chr(c),0))

Solution (Python):
l=[0]*123
while True:
    try:
        a=str(input())
    except:
        break
    m=list(a)
    i=0
    while True:
        try:
            b=m[i]
            l[ord(b)]+=1
            i+=1
        except:
            break
k=97
for j in range(26):
    print(chr(k),':',l[k]+l[k-32])
    k+=1

Solution (Python):
a = []
while True:
    try:
        n = str(input())
    except EOFError:
        break
    b = n.lower()
    a.append(b)

c = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
d = ''.join(a)
for i in range(0,26):
    print('{} : {}'.format(c[i],d.count(c[i])))

Solution (Python):
import sys
texts=sys.stdin.read()
texts=texts.lower()
cnt=[0]*26

letters=list('abcdefghijklmnopqrstuvwxyz')
for x in texts:
    i=0
    for y in letters:
        if x==y:
            cnt[i]+=1
        i+=1
for i in range(26):
    print(letters[i]+" : "+str(cnt[i]))

Solution (Python):
import sys
import string

d = dict()
for l in sys.stdin:
    for c in l:
        c = c.lower()
        d[c] = d.get(c, 0) + 1

for c in string.ascii_lowercase:
    print("{} : {}".format(c, d.get(c, 0)))

Solution (Python):
string = ""
while True:
  try:
    string += input().lower()
  except EOFError:
    break
print("a : {}".format(string.count("a")))
print("b : {}".format(string.count("b")))
print("c : {}".format(string.count("c")))
print("d : {}".format(string.count("d")))
print("e : {}".format(string.count("e")))
print("f : {}".format(string.count("f")))
print("g : {}".format(string.count("g")))
print("h : {}".format(string.count("h")))
print("i : {}".format(string.count("i")))
print("j : {}".format(string.count("j")))
print("k : {}".format(string.count("k")))
print("l : {}".format(string.count("l")))
print("m : {}".format(string.count("m")))
print("n : {}".format(string.count("n")))
print("o : {}".format(string.count("o")))
print("p : {}".format(string.count("p")))
print("q : {}".format(string.count("q")))
print("r : {}".format(string.count("r")))
print("s : {}".format(string.count("s")))
print("t : {}".format(string.count("t")))
print("u : {}".format(string.count("u")))
print("v : {}".format(string.count("v")))
print("w : {}".format(string.count("w")))
print("x : {}".format(string.count("x")))
print("y : {}".format(string.count("y")))
print("z : {}".format(string.count("z")))

Solution (Python):


alpha = 'abcdefghijklmnopqrstuvwxyz'
text = ''

while True:
    try:
        text += input().lower()
    except EOFError:
        break

for a in alpha:
    print('{} : {}'.format(a, text.count(a)))

Solution (Python):
import sys

list_abc = [chr(ord('a') + i) for i in range(26)]
list_abc_count = [0 for _ in range(26)]
for line in sys.stdin.readlines():
    line_low = line.lower()

    for i, abc in enumerate(list_abc):
        n_count = line_low.count(abc)
        list_abc_count[i] += n_count
    
for i, abc in enumerate(list_abc):
    n_count = list_abc_count[i]
    print(f"{abc} : {n_count}")

Solution (Python):
s = ''
while True:
    try:
        s += input().lower()
    except EOFError:
        break
S = list(s)

for c in 'abcdefghijklmnopqrstuvwxyz':
    a = S.count(c)
    print(f'{c} : {a}')

Solution (Python):
import sys

sl = sys.stdin.readlines()
s = ''
for i in sl:
    s += i.rstrip().lower()

a = 'abcdefghijklmnopqrstuvwxyz'
d = {}
for c in a:
    d[c] = 0

for c in s:
    if c in a:
        d[c] += 1

for k, v in d.items():
    print(f'{k} : {v}')

Solution (Python):
a = [chr(ord('a') + i) for i in range(26)] 
import sys
b = str.lower(sys.stdin.read())
for i in a:
    x = 0
    for j in range(len(b)):
        if b[j] == i:
            x = x + 1
    print(i + ' : ' + str(x))

Solution (Python):
count=[0]*26
while True:
    try:
        s=input().lower()
        for i in s:
            if 96<ord(i)<124:
                count[ord(i)-97]+=1
    except:
        break
for i in range(26):
    print(f"{chr(i+97)} : {count[i]}")

Solution (Python):
import sys
ch = sys.stdin.read().lower()

for i in range(97, 123):
    print(chr(i), ':', ch.count(chr(i)))

Solution (Python):
n=[chr(i) for i in range(97, 97+26)]
a=''
while True:
    try:
        a+=input().lower()
    except:
        break
for j in range(26):
    print(n[j] + ' : ' + str(a.count(n[j])))

Solution (Python):
count = [0 for i in range(26)]
while True:
    try:
        s = input()
    except:
        break
    for i in range(len(s)):
        m = ord(s[i]) - ord("a")
        if(m >= 0 and m <= 26):
            count[m] += 1
        m = ord(s[i]) - ord("A")
        if(m >= 0 and m <= 26):
            count[m] += 1
for i in range(26):
    print(chr(i + ord("a")), ":", count[i])

Solution (Python):
a = ord("a")
z = ord("z")
s = ""
while True:
    try:s += input().lower()
    except:break
for x in range(a,z+1):
    print(chr(x),":",s.count(chr(x)))

Solution (Python):
b="abcdefghijklmnopqrstuvwxyz"
c=[0]*26
while True :
    try: 
        a=input()
        for i in range(len(a)):
            if a[i] in b or a[i].lower() in b : c[b.index(a[i].lower())]+=1
    except:break
for j in range(26):
    print(b[j], ":", c[j])

Solution (Python):
import sys
from collections import Counter

keys = [chr(c) for c in range(ord('a'), ord('z') + 1)] 
s = sys.stdin.read()

letters = Counter([c.lower() for c in s if c.isalpha()])

for key in keys:
    print(f'{key} : {letters[key]}')

Solution (Python):
import sys

sentences = sys.stdin.read().lower()

for letter in 'abcdefghijklmnopqrstuvwxyz':
    print(f'{letter} : {sentences.count(letter)}')

Solution (Python):
import sys
s = sys.stdin.read().lower()

for c in map(chr,range(97,123)):
    print(c,':',s.count(c))

Solution (Python):
import sys

BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001


table = [0]*26

letters = "abcdefghijklmnopqrstuvwxyz"
input_str = sys.stdin.read()

for A in input_str:
    index = 0
    for B in letters:
        if A == B or A == B.upper():
            table[index] += 1
            break
        index += 1

for i in range(len(letters)):
    print("%s : %d"%(letters[i],table[i]))

Solution (Python):
import collections
import sys
s =''

for line in sys.stdin:
    s+=line.lower()

c = collections.Counter(s)
for i in range(97, 97+26):
    print(f'{chr(i)} : {c[chr(i)]}')

Solution (Python):
w = ""
try:
    for _ in range(5):
        w += input().lower()
except EOFError:
    pass

ch = ["a", "b", "c", "d", "e", "f", "g", "h", "i",
      "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t",
      "u", "v", "w", "x", "y", "z"]

for chkspell in ch:
    print("{} : {}".format(chkspell, w.count(chkspell)))

Solution (Python):
import sys

string = sys.stdin.read().lower()

letters = "abcdefghijklmnopqrstuvwxyz"
for l in letters:
    print('{} : {}'.format(l, string.count(l)))

Solution (Python):
alphabet  = 'abcdefghijklmnopqrstuvwxyz'
number = [0 for i in range(26)]
import sys
lines = sys.stdin.readlines()
for i, line in enumerate(lines):
    line = line.rstrip('\n')
    line =  line.lower()
    for i in range(len(line)):
      if line[i] in alphabet:
        number[alphabet.index(line[i])] += 1
    
for i in range(len(alphabet)):
  print(f'{alphabet[i]} : {number[i]}')

Solution (Python):
import sys

alphabet = dict.fromkeys("abcdefghijklmnopqrstuvwxyz", 0)

word = sys.stdin.read().lower()

for i in alphabet:
    count = word.count(i)
    print(f'{i} : {count}')

Solution (Python):
sentense = ""
while True:
    try:
        line = input()
        sentense += line.lower()
    except EOFError:
        break
        
alphabet = "abcdefghijklmnopqrstuvwxyz"

for i in range(26):
    print(alphabet[i] + " : " + str(sentense.count(alphabet[i])))

Solution (Python):
count = [0 for i in range(26)]
while True:
    try:
        str = input().lower()
    except EOFError:
        break
    for i in range(len(str)):
        for j in range(26):
            if ord(str[i])==97+j:
                count[j]+=1
                break
for i in range(26):
    print(f'{chr(97+i)} : {count[i]}')

Solution (Python):
import string
import collections
a=string.ascii_letters
l=[]

while True:
    try:
        n=list(input())
        l+=n
    except:
        break
    
c = collections.Counter(l)
for i in range(26):
    print(a[i]+" : "+str(c[a[0+i]]+c[a[26+i]]))

Solution (Python):
str1=input()
n=97

while True:
    try:
        val=input()
        str1+=val

    except:
        str2=str1.lower()
        for i in range(26):
            j=n+i
            k=str2.count(chr(j))
            print(chr(j), ":", k)
        break

Solution (Python):
count = [0]*26
while True:
    try:
        S = input().lower()
        for i in S:
            if 96 < ord(i) < 124:
                count[ord(i)-97] += 1
    except:
        break
for i in range(26):
    print(f"{chr(i+97)} : {count[i]}")

Solution (Python):
EIBUN=""
while True:
    try:
        EIBUN+=input()

    except:
        break
å="abcdefghijklmnopqrstuvwxyz"
ß="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for i in range(26):
    print(å[i],":",EIBUN.count(å[i])+EIBUN.count(ß[i]))
    i+=1

Solution (Python):

from sys import stdin

a = [chr(ord('a') + i) for i in range(26)]


dic = {}
for ai in a:
  dic[ai] = 0


b = list(stdin.readline().rstrip())
while len(b) != 0:
  for bi in b:
    if bi.lower() in dic.keys():
      dic[bi.lower()] += 1
  b = list(stdin.readline().rstrip())
  
  

for ai in a:
  print("{0} : {1}".format(ai,dic[ai]))

Solution (Python):
import sys

input = sys.stdin.readline

def main():
    mojiretu = ""
    while True:
        s = input().rstrip()
        if s == "":
            break
        mojiretu += s
    alphabet = [chr(i) for i in range(97, 97+26)]
    mojiretu = mojiretu.lower()
    for i in alphabet:
        print( i + " : " + str(mojiretu.count(i)))
    
if __name__ == "__main__":
    main()

Solution (Python):
import string
def run():
    letter_list=[] 
    while True:
        try:
            letter_list.append(input())
    
        except:
            break
        
    letter="".join(letter_list)
    
    d={k:0 for k in string.ascii_lowercase}
    
    for c in letter:
        c=c.lower()
        if c in d:
            d[c]+=1
            
    for c in string.ascii_lowercase:
        print(f"{c} : {d[c]}")


run()

Solution (Python):
lis=""


while True:
    try:
        lis+=input().lower()
    except EOFError:
        break


l=[chr(ord('a')+i) for i in range(26)]
for s in l:
	n=lis.count(s)
	print(f"{s} : {n}")

Solution (Python):
import sys
import string

s = ''
for e in sys.stdin:
    s += e.rstrip().lower()

alpha = string.ascii_lowercase
count = []

for i in range(26):
    count.append(s.count(alpha[i]))

for i in range(26):
    print(alpha[i] + ' : ' + str(count[i]))

Solution (Python):
s = ""
while True:
    try:
        s += input().lower()
    except:
        break

Ans = [0] * 26

for x in range(len(s)):
    if ord(s[x:x+1]) -97 >=0 and ord(s[x:x+1]) -97 <=26:
        Ans[ord(s[x:x+1]) -97] +=1

for x in range(26):
    print(chr(x+97) + " : " + str(*Ans[x:x+1]))

Solution (Python):
import sys

lines = sys.stdin.readlines()

dic = {}
chars = "abcdefghijklmnopqrstuvwxyz"

for c in chars:
    dic[c] = 0

for line in lines:
    for c in line:
        c = c.lower()
        if not c in chars:
            continue
        dic[c] += 1

for c in chars:
    print(c, ":", dic[c])

Solution (Python):
a = "abcdefghijklmnopqrstuvwxyz"
A = [0 for i in range(26)]

while True :
    try :
        s = input()
        
        for i in range(len(s)) :
            if s[i] in a or s[i].lower() in a :
                A[a.index(s[i].lower())] += 1
    except :
        break
    
for j in range(26) :
    print(a[j], ":", A[j])

Solution (Python):
import sys
texts=sys.stdin.read()
texts=texts.lower()
cnt=[0]*26

letters=list('abcdefghijklmnopqrstuvwxyz')
for x in texts:
    i=0
    for y in letters:
        if x==y:
            cnt[i]+=1
        i+=1
for i in range(26):
    print(letters[i]+' : '+str(cnt[i]) )

Solution (Python):
import sys

ans=[0]*123
letters="abcdefghijklmnopqrstuvwxyz"
input_str=sys.stdin.read()
for a in input_str:
    index=0
    for b in letters:
        if a==b or a==b.upper():
            ans[index]+=1
        else :
            index+=1
        
for i in range(len(letters)):
    print(letters[i],":",ans[i])

Solution (Python):
import sys
texts=sys.stdin.read()
texts=texts.lower()
cnt=[0]*26

letters=list('abcdefghijklmnopqrstuvwxyz')
for x in texts:
    i=0
    for y in letters:
        if x==y:
            cnt[i]+=1
        i+=1
for i in range(26):
    print(letters[i]+" : "+str(cnt[i]))

Solution (Python):
import sys
n=[0]*26
S=sys.stdin.read()
s=S.lower()
for i in range(len(s)):
    j=ord(s[i])-97
    if j>=0 and j<26:
        n[j]+=1
for i in range(26):
    print(chr(i+97),':',n[i])

Solution (Python):
s = ''
while True:
    try:
        s += input().lower()
    except:
        break
for i in range(26):
    print(chr(97+i) + ' : ' + str(s.count(chr(97+i))))

Solution (Python):
import sys

s = sys.stdin.read().lower()
table = {
    "a": 0,
    "b": 0,
    "c": 0,
    "d": 0,
    "e": 0,
    "f": 0,
    "g": 0,
    "h": 0,
    "i": 0,
    "j": 0,
    "k": 0,
    "l": 0,
    "m": 0,
    "n": 0,
    "o": 0,
    "p": 0,
    "q": 0,
    "r": 0,
    "s": 0,
    "t": 0,
    "u": 0,
    "v": 0,
    "w": 0,
    "x": 0,
    "y": 0,
    "z": 0,
}

for i in list(s):
    if i in table:
        table[i] += 1
    else:
        continue

for i in table:
    print('{} : {}'.format(i,table[i]))

Solution (Python):
import sys
ans = [0]*26
str = sys.stdin.read()

for i in range(len(str)):
    code = ord(str[i])-ord("a")
    if 0 <= code <= 25:
        ans[code]+=1
    else:
        code = ord(str[i])-ord("A")
        if 0 <= code <= 25:
            ans[code]+=1

for i in range(26):
    print(chr(ord('a')+i), ":", ans[i])

Solution (Python):
S = ''
while True:
    try:
        S_tmp = input()
        S += S_tmp
    except EOFError:
        break

import string
from collections import OrderedDict
d = OrderedDict.fromkeys(string.ascii_lowercase, 0)

for s in S.lower():
    if s in d.keys():
        d[s] += 1

for key in d.keys():
    print('{} : {}'.format(key, d[key]))

Solution (Python):
import sys
import string
a=string.ascii_letters
import collections

lst=list(sys.stdin.read())
c = collections.Counter(lst)
for i in range(26):
    print(a[i]+" : "+str(c[a[0+i]]+c[a[26+i]]))

Solution (Python):
import sys
S = ''
for s in sys.stdin:
    S += s.lower()
        
cha = 'abcdefghijklmnopqrstuvwxyz'

for i in cha:
    print('{} : {}'.format(i, S.count(i)))

Solution (Python):
c=[0]*26
while True:
    try:
        x1=input()
        x2=x1.lower()
        for i in x2:
            if 96<ord(i)<124:
                c[ord(i)-97]+=1
    except:
        break
    
for i in range(26):
    print(f'{chr(i+97)} : {c[i]}')

Solution (Python):
import sys
import string

count = {k : 0 for k in string.ascii_lowercase}
for c in sys.stdin.read().lower():
    if c.islower():
        count[c] = count[c] + 1
for k, v in count.items():
    print(f"{k} : {v}")

Solution (Python):


m='abcdefghijklmnopqrstuvwxyz'
c=[]
A=[]
while True:
    try:
        a=input()
    except:
        break
    a = a.lower()
    for j in range(len(a)):
        K = ord(a[j])
        A.append(K)
    
    
for i in range(97,123):
        
    k = A.count(i)
    c.append(k)
        

for j in range(26):
    print(m[j],':',c[j])

Solution (Python):
cnt = [0 for i in range(26)]
letters = "abcdefghijklmnopqrstuvwxyz"
str = open(0).read()

for c in str:
  for j in range(len(letters)):
    if c == letters[j] or c == letters[j].upper():
      cnt[j] += 1
      break
for i in range(26):
    
  print(letters[i], ":", cnt[i])

Solution (Python):

counts = {chr(cord): 0 for cord in range(ord('a'), ord('z') + 1)}
while True:
    try:
        word = input()
    except:
        break
    c2 = str.lower(word)
    for letter in c2:
        if letter in counts.keys():
            counts[letter] += 1
for letter, count in counts.items():
    print('{} : {}'.format(letter,count))

Solution (Python):
import sys

dict = {}
for i in range(97, 123):
    dict[chr(i)] = 0

lines = sys.stdin.readlines()

for line in lines:
    for i in range(len(line)):
        c = line[i].lower()
        if ord(c) >= 97 and ord(c) <= 123:
            dict[c] += 1

l = list(dict.items())
for i in l:
    print(f'{i[0]} : {i[1]}')

Solution (Python):
alf = [0 for i in range(26)]
while True:
      try:
            a = input()
      except:
            break

      for i in range(len(a)):
            n = ord(a[i])-ord('A')
            if(n >= 0 and n < 26):
                  alf[n]+=1
            n = ord(a[i])-ord('a')
            if(n >= 0 and n < 26):
                  alf[n]+=1
for i in range(26):
      print(chr(i+ord('a')),":",alf[i])

Solution (Python):


counts = {chr(code): 0 for code in range(ord('a'), ord('z') + 1)}

words = []

while True:
     try:
         wordr = input()
     except EOFError:
         break
     word = wordr.lower()
     words.append(word)

for word in words:
    for letter in word:
        if letter in counts.keys():
            counts[letter] += 1

for letter, count in counts.items():
    print(letter,':', count)

Solution (Python):
a = []
S =''
try:
    while True:
        S += input()
except:
    pass

a.append(S)
a = ''.join(a)
a = ','.join(a)
x = a.lower()
    
b =[]
j = 1
y = len(x)
while j <= y:
    c = ord(x[j-1])
    b.append(c)
    j += 1
       
i = 1    
for i in range(97, 123):
    d = b.count(i)
    e = chr(i)
    print(f'{e} : {d}')
            
    i += 1

Solution (Python):



n = open(0)
n = n.read()
l1 = "abcdefghijklmnopqrstuvwxyz"
l2 = [0]*26

for i in n:
   for j in range(len(l1)):
      if i == l1[j] or i == l1[j].upper():
         l2[j] += 1

for i in range(len(l1)):
   print(l1[i], ":", l2[i])

Solution (Python):
import sys

list = "abcdefghijklmnopqrstuvwxyz"
y = sys.stdin.read()
for x in list:
    print(x + ' : ' + str(y.lower().count(x)))

Solution (Python):

c = [0]*26

while True:
    try:
        a = input()
        a = list(a.lower())
    except:
        break
    
    for i in range(len(a)):
        tmp = ord(a[i])
        if tmp>=97 and tmp <= 123:
            c[tmp-97] += 1

for i in range(ord("a"),ord("z")+1):
    print(chr(i),":",c[i-97])

Solution (Python):
sentence = ''
while True:
    try:
        sentence += input()
    except:
        break
sl = list(sentence.lower())
for i in range(97, 123):
    print(chr(i), ':', sl.count(chr(i)))

Solution (Python):
letters = 'abcdefghijklmnopqrstuvwxyz'
counts = [0] * 26
sentence = []

s = input()
while s:
    try:
        sentence += s
        s = input()
    except EOFError:
        break

for c in sentence:
    i = letters.find(c.lower())
    if i >= 0:
        counts[i] += 1
        
for c in letters:
    print(c, ':', counts[letters.find(c)])

Solution (Python):
import sys

alphabet = "abcdefghijklmnopqrstuvwxyz"
count_dict = dict.fromkeys(alphabet,0)
s = []
for l in sys.stdin:
    s.append(l)

def count(str):
    for c in alphabet:
        count_dict[c] += str.count(c)
    str = str.swapcase()
    for c in alphabet:
        count_dict[c] += str.count(c)

for str in s:
    count(str)
    
for key,value in count_dict.items():
    print("{} : {}".format(key,value))

Solution (Python):
import sys
import string

def count_char_v2():
    alphabet = string.ascii_lowercase
    lst = [0 for _ in range(len(alphabet))]

    for line in sys.stdin:
        for char in line:
            if char.isalpha():
                index = alphabet.index(char.lower())
                lst[index] += 1

    for i in range(len(alphabet)):
        print(f"{alphabet[i]} : {lst[i]}")


if __name__ == "__main__":
    count_char_v2()

Solution (Python):
letter = "abcdefghijklmnopqrstuvwxyz"
dic = {}
for i in letter:
    dic.setdefault(i,0)
while 1:
    try:
        a = str(input()).lower()
    except:
        break
    for i in a:
        for j in letter:
            if i == j:
                dic[i] += 1
for i in dic:
    print(f"{i} : {dic[i]}")

Solution (Python):
import sys
cnts = {}
for line in sys.stdin:
    for c in list(line.lower()):
        cnts[c] = cnts.get(c,0) + 1
  
for c in range(ord('a'),ord('z')+1):
    print(chr(c),':',cnts.get(chr(c),0))

Solution (Python):
alphabets = 'abcdefghijklmnopqrstuvwxyz'
text = ''

while True:
    try:
        text += input().lower()
    except:
        break

for a in alphabets:
    print('{} : {}'.format(a, text.count(a)))

Solution (Python):
s=""
while True:
    try:
        s+=str(input().lower())
    except:
        break
for i in range(97,123):
    print(chr(i),":",s.count(chr(i)),sep=" ")

Solution (Python):
import string
import sys

F = sys.stdin

mydict = {}
alp = list(string.ascii_lowercase)

for i in alp:
        mydict[i] = 0

for line in F:
    line = line.rstrip()
    line = line.lower()
        
    
    for j in line:
        if j in alp:
            mydict[j] += 1
        
for key, value in mydict.items():
    print("{0} : {1}".format(key, value))

Solution (Python):
import sys
s=sys.stdin.read().lower()
for i in range(97,123):
    print(chr(i),':',s.count(chr(i)))

Solution (Python):
import sys
s=sys.stdin.read().lower()
for i in range(97,123):
    print(chr(i),":",s.count(chr(i)))

Solution (Python):
al = [chr(ord("a") + i) for i in range(26)]


def num_al(x):
    a = word.count(chr(ord("a") + x))
    return a


mylist = []
while True:
    try:
        x = input()
        mylist.append(x)
    except EOFError:
        break

abc = "".join(mylist)
word = abc.lower()

for i in range(26):
    print(f"{al[i]} : {num_al(i)}")

Solution (Python):
import sys

x = {}

for line in sys.stdin:
  for l in line:
    if l.isalpha():
      c = l.lower()
      x[c] = x.get(c,0)+1

for i in range(26):
  c = chr(ord('a')+i)
  print(f'{c} : {x.get(c,0)}')

Solution (Python):
import sys

ans = sys.stdin.read().lower()

for key in range(97,123):
    key_c = chr(key)
    key_cnt = ans.count(key_c)
    print(key_c,':',key_cnt)

Solution (Python):
charactors = {}
for i in range(97,123):
    key = chr(i)
    value = 0 
    charactors[key] = value

while True:
    try:
        string = input()

        for c in string:
            low_c = c.lower()
            if low_c.isalpha():
                charactors[low_c] += 1
    except EOFError:
        break

for k,v in charactors.items():
    print(k +" : "+str(v))

Solution (Python):
from string import ascii_lowercase, ascii_uppercase
text = open(0).read()
text = list(text.lower())
abc = list(ascii_lowercase)
answer = [0]*26

for i in text:
    num = ascii_lowercase.find(i)
    if num > -1:
        answer[num] += 1

for i in range(26):
    print(f"{abc[i]} : {answer[i]}")

Solution (Python):
import sys

l = [s.lower() for s_l in list(sys.stdin) for s in s_l if 65 <= ord(s) < 91 or 97 <= ord(s) < 123]
d = {chr(k): 0 for k in range(97, 123)}
for s in l:
    if d.get(s, None) is not None:
        d[s] += 1
for k in d:
    print('{} : {}'.format(k, str(d[k])))

Solution (Python):
s = ""
try:
    while True:
        s += input().lower()
except:
    pass
for i in range(ord("a"),ord("z")+1):
    print(chr(i)+" : "+str(s.count(chr(i))))

Solution (Python):
import sys
texts=sys.stdin.read()

alpha = ['A','B','C','D','E','F','G','H','I',
         'J','K','L','M','N','O','P','Q',
         'R','S','T','U','V','W','X','Y','Z']

for i in range(len(alpha)):
    ans = texts.count(alpha[i])
    ans += texts.count(alpha[i].lower())
    print(alpha[i].lower() + ' ' + ':' + ' ' + str(ans))
    ans = 0

Solution (Python):
import sys

alphas = {alpha: 0 for alpha in "abcdefghijklmnopqrstuvwxyz"}

for char in sys.stdin.read().lower():
    if char not in alphas.keys():
        continue
    alphas[char] += 1
    
for alpha, val in alphas.items():
    print("{} : {}".format(alpha, val))

Solution (Python):
import sys
s=sys.stdin.read().lower()
for c in map(chr,range(97,123)):print(c,':',s.count(c))

Solution (Python):
count_char = list(0 for i in range(26))
while True :
    try :
        str_org = str(input())
        str_org = str_org.lower()
        for i in range(len(str_org)) :
            num_org = ord(str_org[i])
            if num_org > 96 and num_org < 123 :
                count_char[num_org - 97] += 1
    except EOFError :
        break
    
for i in range(97, 123) :
    print(chr(i), ":", count_char[i-97])

Solution (Python):
sentence = ''

while True:
    try:
        temp = input()
    except:
        break
    sentence += temp

alpha = [chr(i) for i in range(97, 97+26)]

for each_char in alpha:
    print('{} : {}'.format(each_char,sentence.lower().count(each_char)))

Solution (Python):
import sys
d = {chr(i): 0 for i in range(97,97+26)}
for line in sys.stdin:
  s = list(line.lower())
  for i in s:
    if d.get(i) != None:
      d[i] += 1
[print(f"{key} : {value}") for [key,value] in d.items()]

Solution (Python):
import sys

table = [0]*26

letters = "abcdefghijklmnopqrstuvwxyz"
input_str = sys.stdin.read()

for A in input_str:
    index = 0
    for B in letters:
        if A == B or A == B.upper():
            table[index] += 1
            break
        index += 1

for i in range(len(letters)):
    print("%s : %d"%(letters[i],table[i]))

Solution (Python):
import sys, string

lines = ''
for line in sys.stdin:
    lines += line
arr = [i for i in string.ascii_lowercase]
lines = lines.lower()

for i in range(len(arr)):
    print(arr[i], ':', lines.count(arr[i]))

Solution (Python):
from sys import stdin

sentence = stdin.read().rstrip()
lis = [0] * 26
for char in sentence:
    if char.isalpha():
        codenum = ord(char)
        if codenum >= 97:
            codenum -= 97
        else:
            codenum -= 65
        lis[codenum] += 1

for i in range(len(lis)):
    print('%s : %d'%(chr(i+97), lis[i]))

Solution (Python):
import sys

string = sys.stdin.read().lower()
[print(f'{c} : {string.count(c)}') for c in map(chr, range(97, 97+26))]

Solution (Python):
y = [0 for i in range(26)]
while True:
      try:
            s = input()
      except:
            break
      for i in range(len(s)):
            m = ord(s[i])-ord('A')
            if(m >= 0 and m < 26):
                  y[m]+=1
            m = ord(s[i])-ord('a')
            if(m >= 0 and m < 26):
                  y[m]+=1
for i in range(26):
      print(chr(i+ord('a')),":",y[i])

Solution (Python):
import string
import sys

input_str = sys.stdin.read()

for i in range(26):
    char = string.ascii_lowercase[i]
    CHAR = string.ascii_uppercase[i]
    cnt = input_str.count(char) + input_str.count(CHAR)
    print("{0} : {1}".format(char, cnt))

Solution (Python):

str3 = input()
str3 = str3.lower()
try:
    while True:
        str1 = input()
        str1 = str1.lower()
        str3 += str1
except EOFError:
    pass


finally:
    for num in range(ord("a"),ord("a") + 26):
        str2 = chr(num)
        num2 = str3.count(str2)
        print(str2 + " : " + str(num2))

Solution (Python):
abc = 'abcdefghijklmnopqrstuvwxyz'
arrabc = []
for s in abc:
	arrabc.append(s)

line = ''
while True:
	try:
		sinput = input()
		if sinput == '':
			break
		line = line + sinput
	except EOFError:
		break

arrinput = []
for s in line:
	arrinput.append(s.lower())

for s in arrabc:
	print('{0} : {1}'.format(s,arrinput.count(s)))

Solution (Python):
import sys

text = sys.stdin.read()

counts = {chr(code): 0 for code in range(ord('a'), ord('z')+1)}

for letter in text:
    letter = letter.lower()
    if letter in counts.keys():
        counts[letter] += 1

for key, val in counts.items():
    print(key + ' : ' + str(val),end='\n')

Solution (Python):
import sys
s = sys.stdin.read()
s = s.lower()
ans = [0] * 26
n = [chr(i) for i in range(97, 123)]
for i in range(len(s)):
    if s[i] in n:
        ans[n.index(s[i])] += 1

for i in range(len(ans)):
    print(n[i], ":", ans[i])

Solution (Python):
import sys
import string
texts = sys.stdin.read()
texts = texts.lower()

for char in list(string.ascii_lowercase):
    print("{} : {}".format(char, texts.count(char)))

Solution (Python):
alpha = 'abcdefghijklmnopqrstuvwxyz'
text = ''

while True:
    try:
        text += input().lower()
    except EOFError:
        break

for r in alpha:
    print("{} : {}".format(r, text.count(r)))