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):
import sys
alph = list("abcdefghijklmnopqrstuvwxyz")
sentence = list(sys.stdin.read().lower())
for i in alph:
    print("%s :" % i, sentence.count(i))

Solution (Python):

import os,re,sys,operator,math,heapq,string



from sys import stdin,setrecursionlimit


setrecursionlimit(10**6)



t=stdin.read()
abc=string.ascii_lowercase
ABC=string.ascii_uppercase
for i in range(26):
    n=t.count(abc[i])+t.count(ABC[i])
    print(abc[i],":",n)

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

Solution (Python):
from sys import stdin
count = [0 for x in range(26)]

for line in stdin:
    word = line.lower()
    for i in range(len(word)):
        if word[i].isalpha():
            count[ord(word[i])-ord("a")] += 1

for i in range(26):
    print(chr(i +ord("a")),end="")
    print(" : ",end="")
    print(count[i])

Solution (Python):
d = dict.fromkeys([a for a in 'abcdefghijklmnopqrstuvwxyz'], 0)
while 1:
    try:
        for i in input().lower():
            if i in d:d[i] += 1
    except EOFError:
        break
    
for k, v in d.items():
    print(f"{k} : {v}")

Solution (Python):
list = []
alphabet=dict.fromkeys("abcdefghijklmnopqrstuvwxyz",0)

while True:
    try:
        word = input()
        word=word.lower()
        list.append(word)
    except:
        break



list.sort()

s = "".join(list)
for i in alphabet:
    count_num=s.count(i)
    print(f"{i} : {count_num}")

Solution (Python):
import sys
alphabet = [chr(ord('a') + i) for i in range(26)]
num_d = {}
for tmp_char in alphabet:
    num_d[tmp_char] = 0

input_str = sys.stdin.read()
input_str = list(input_str.lower())
for in_chr in input_str:
    if in_chr in alphabet:
        num_d[in_chr] += 1
        
for out_str in alphabet:
    print(out_str, " : ", num_d[out_str], sep="")

Solution (Python):
A=[0 for  d in range(26)]
while True:
	try:
		s=list(input())
		for n in range(len(s)):
			c=ord(s[n])
			if 97 <= c and c <= 122:
				A[c-97]+=1
			elif 65 <= c and c <= 90:
				A[c-65]+=1
	except EOFError:
		break
for n in range(26):
	print(f"{chr(97+n)} : {A[n]}")

Solution (Python):
A=[0 for  d in range(26)]
while True:
	try:
		s=list(input())
		for n in range(len(s)):
			c=ord(s[n])
			if 97 <= c and c <= 122:
				A[c-97]+=1
			elif 65 <= c and c <= 90:
				A[c-65]+=1
	except EOFError:
		break
for n in range(26):
	print(f"{chr(97+n)} : {A[n]}")

Solution (Python):
import sys

def test():

	counter = [0] * 26

	for inputs in sys.stdin:
		string = list(inputs)

		if len(string) == 0:
			break
	
		for i in range(len(string)):

			
			if ord('a') <= ord(string[i]) and ord(string[i]) <= ord('z'):
				counter[ord(string[i]) - 0x61] += 1

			
			elif ord('A') <= ord(string[i]) and ord(string[i]) <= ord('Z'):
				counter[ord(string[i]) - 0x41] += 1
		if i == 0:
			break

	for i in range(26):
		print(f"{chr(i+0x61)} : {counter[i]}")

if __name__ == "__main__":
	test()

Solution (Python):


alpb = [0 for i in range(26)]
while True:
    try:
        x = input().lower()
    except EOFError:
        break
    for i in x:
        y = ord(i)
        if y < 97 or 122 < y:
            continue
        alpb[y - 97] += 1
for i in range(26):
    print('{0} : {1}'.format(chr(i + 97), alpb[i]))

Solution (Python):
import sys

cnt = {}

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

for i in range(26):
  c = chr(ord('a')+i)
  print( c, " : ", cnt.get(c,0), sep = '' )

Solution (Python):
a_list =[]
while True:
	try:
		a = input()
		a = a.lower()
		a_list += list(a)
	except EOFError:
		break
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 i in range(26):
	print("{} : {}".format(ch[i],a_list.count(ch[i])))

Solution (Python):
import sys
data = sys.stdin.read()
data = data.lower()
ans = {
       '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 data:
    if i in ans:
        ans[i] += 1

for i in ans:
    print(i, ':', ans[i])

Solution (Python):
import string, sys, collections

counter = collections.Counter()
for line in sys.stdin:
    counter += collections.Counter(line.lower())

for ch in string.ascii_lowercase:
    print("{} : {}".format(ch, counter[ch]))

Solution (Python):
import sys
a = [0]*26

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

for i in map(chr, range(ord('a'), ord('z')+1)):
    print(i, ':', s.count(i))

Solution (Python):
v = [0 for i in range(26)]

try:
	while True:
		for c in list(input()):
			if 'a' <= c and c <= 'z':
				v[ord(c)-ord('a')] += 1
			elif 'A' <= c and c <= 'Z':
				v[ord(c)-ord('A')] += 1
except EOFError:
	pass

for i in range(26):
	print(f"{chr(i+ord('a'))} : {v[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):
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):
import sys
  
cnt = {}
  
for line in sys.stdin:
  for l in line:
    if l.isalpha():
      c = l.lower()
      cnt[c] = cnt.get(c,0)+1
  
for i in range(26):
  c = chr(ord('a')+i)
  print( c, " : ", cnt.get(c,0), sep = '' )

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
 
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):
from string import ascii_lowercase, ascii_uppercase
s = open(0).read()
ans = [0]*26
for c in s:
    i = ascii_lowercase.find(c)
    if i > -1:
        ans[i] += 1
    i = ascii_uppercase.find(c)
    if i > -1:
        ans[i] += 1
for c, t in zip(ascii_lowercase, ans):
    print("%s : %d" % (c, t))

Solution (Python):
import sys
xx="abcdefghijklmnopqrstuvwxyz"
 
str=sys.stdin.read()
for i in xx:
    print(f"{i} : {str.lower().count(i)}")

Solution (Python):

import sys
s = sys.stdin.read().lower()

char = "abcdefghijklmnopqrstuvwxyz"
for n in char:
  ans = s.count(n)
  print(n + " : "+str(ans))

Solution (Python):
import sys

LINES = sys.stdin.readlines()

count = {}
chars = "abcdefghijklmnopqrstuvwxyz"
for c in chars:
	count[c] = 0

for l in LINES:
	for c in l:
		c = c.lower()
		if not c in chars:
			continue
		count[c] += 1

for c in chars:
	print(c + " : " + str(count[c]))

Solution (Python):
s = ''
while True:
    try:
        s += input().lower()
    except EOFError:
        break
 
for c in 'abcdefghijklmnopqrstuvwxyz':
    print('{} : {}'.format(c, s.count(c)))

Solution (Python):
import sys
s = sys.stdin.read()
ans = [0 for i in range(26)]
s = s.lower()
for i in range(len(s)):
    if s[i]>='a' and s[i]<='z':
        ans[ord(s[i])-ord('a')] += 1

for i in range(25):
    print('%s : %d'%(chr(ord('a')+i),ans[i]))
print('z : %d'%(ans[25]))

Solution (Python):
alphabet_lowercase = [(chr(i), 0) for i in range(97, 97 + 26)]
char_count = dict(alphabet_lowercase)
while True:
    try:
        sentence = input()
        for s in sentence:
            char = s.lower()
            if char in char_count:
                char_count[char] += 1
    except:
        break

for k, v in char_count.items():
    print("{} : {}".format(k, v))

Solution (Python):
import sys
import string

count = {k:0 for k in string.ascii_lowercase}

for s in sys.stdin.read().lower():
  if s.islower():
    count[s] = count[s]+1
for k,v in count.items():
  print("{:s} : {:d}".format(k,v))

Solution (Python):
b = [0 for i in range(28)]
d = {
    "a":1,
    "b":2,
    "c":3,
    "d":4,
    "e":5,
    "f":6,
    "g":7,
    "h":8,
    "i":9,
    "j":10,
    "k":11,
    "l":12,
    "m":13,
    "n":14,
    "o":15,
    "p":16,
    "q":17,
    "r":18,
    "s":19,
    "t":20,
    "u":21,
    "v":22,
    "w":23,
    "x":24,
    "y":25,
    "z":26
}
while(True):
  try:
    a = input()
  except:
    break
  if a == "":
    break
  a = str.lower(a)
  a = list(a)

  for i in a:
    if i in d:
      b[d[i]-1] = b[d[i]-1] + 1

for key in d:
  print(key, b[d[key]-1],sep=" : ")

Solution (Python):
cnt = [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):
                  cnt[m]+=1
            m = ord(s[i])-ord('a')
            if(m >= 0 and m < 26):
                  cnt[m]+=1
for i in range(26):
      print(chr(i+ord('a')),":",cnt[i])

Solution (Python):
lit=[0 for ased in range(26)]
while True:
	try:
		s=input()
		for a in s:
			g=(ord(a))
			if g>=65 and g<=65+26:
				lit[g-65]+=1
			elif g>=97 and g<=97+26:
				lit[g-97]+=1
	except EOFError:
		break
		
for AA in range(26):
	print(chr(97+AA)+' : '+str(lit[AA]))

Solution (Python):
import string
import sys

d = {s:0 for s in string.ascii_lowercase}

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

for t in text:
  try:
    d[t] += 1
  except:
    continue

for i in d.items():
  print(i[0] + " : " + str(i[1]))

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 sys

s = ""
for line in sys.stdin:
  s += line
  
char = "abcdefghijklmnopqrstuvwxyz"

for c in char:
  n1 = s.count(c)
  n2 = s.count(c.upper())
  print(c + " : " + str(n1 + n2))

Solution (Python):
a_list = ['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']
b_list = []
while True:
    try:
        al = input()
        al = al.lower()
        b_list = b_list + list(al)

    except:
        break

for i in range(len(a_list)):
    print(a_list[i] + " : " + str(b_list.count(a_list[i])))

Solution (Python):
import string

dic = { ch:0 for ch in string.ascii_lowercase }

while True:
    try:
        line = input()

        for ch in line:
            c = ch.lower()

            if c not in dic:
                continue

            dic[c] += 1

    except EOFError:
        break

for ch in string.ascii_lowercase:
    print(ch, ':', dic[ch])

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):
import sys

s = sys.stdin.read().lower()
words = 'abcdefghijklmnopqrstuvwxyz'
for x in range(26) :
  print(words[x] + ' : %d' % s.count(words[x]))

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):
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):
import sys
s = ""
for e in sys.stdin:
    s += e
letters = "abcdefghijklmnopqrstuvwxyz"
ans = [0] * 26

for i in s:
    index = 0
    for j in letters:
        if i == j or i == j.upper():
            ans[index] += 1
            break
        index += 1

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

Solution (Python):
import string
import sys


if __name__ == "__main__":
    input_str = sys.stdin.read()
    for ch in string.ascii_lowercase:
        print(f"{ch} : {input_str.lower().count(ch)}")

Solution (Python):
STR=''
try:
    while True:
        str=input()
        str=str.lower()
        if str=='':
            break
        STR+=str
except EOFError:
    pass
for i in range(26):
    sum=0
    sum=STR.count(chr(ord('a')+i))
    print('%s : %d' % (chr(ord('a')+i),(sum)))

Solution (Python):
al = [0] * 26

while True:
    try:
        s = input()
        for i in s:
            if i.isalpha():
                al[ord(i.lower()) - ord("a")] += 1
    except EOFError:
        break
    
for i in range(ord("a"),ord("a")+26):
    print("{0} : {1}".format(chr(i),al[i - ord("a")]))

Solution (Python):
import sys
cs = { c : 0 for c in list("abcdefghijklmnopqrstuvwxyz")}
for c in list(sys.stdin.read()):
    c = c.lower()
    if c in cs.keys():
        cs[c] = cs[c] + 1
for (c,cnt) in sorted(list(cs.items())):
    print('{0} : {1}'.format(c,cnt))

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

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

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

A=sys.stdin.read()
B=list(A.lower())
D=list("abcdefghijklmnopqrstuvwxyz")
C=list()
for i in range(26):
  C.append(B.count(D[i]))
for i in range(26):
  print(D[i],":",C[i])

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 sys


class mymath:
    
    pi = 3.14159265358979323846264338

    
    def pnum_eratosthenes(self, n):
        ptable = [0 for i in range(n+1)]
        plist = []

        for i in range(2, n+1):
            if ptable[i]==0:
                plist.append(i)
                for j in range(i+i, n+1, i):
                    ptable[j] = 1
        return plist

    
    def gcd(self, a, b):
        if b == 0:
            return a
        return self.gcd(b, a%b)

    
    def lcm(self, a, b):
        return (a*b)//self.gcd(a,b)

    
    def mul(self, A, B):
        ans = []
        for a in A:
            c = 0
            for j, row in enumerate(a):
                c += row*B[j]
            ans.append(c)
        return ans

mymath = mymath()


class output:
    
    def list(self, l):
        l = list(l)
        
        for i, num in enumerate(l):
            print(num, end="")
            if i != len(l)-1:
                print(" ", end="")
        print()

output = output()






















def get_input():
    N = []
    while True:
        try:
            N.append(input())
        except EOFError:
            break
    return N

def main():


    N = get_input()
    for i, row in enumerate(N):
        N[i] = row.lower()
    abc = [chr(ord('a') + i) for i in range(26)]
    ans = []
    
    for i in abc:
        temp = 0
        for j in N:
            temp += j.count(i)
        ans.append(i+' : {}'.format(temp))

    for i in ans:
        print(i)

if __name__ == '__main__':
    main()

Solution (Python):
import string
import sys
english = sys.stdin.read()
table = [0] * 26
index = 0
for s in string.ascii_lowercase:
    for t in english:
        if s == t or s.upper() == t:
            table[index] += 1
    index += 1

index = 0
for s in string.ascii_lowercase:
    print("%s : %d"%(s, table[index]))
    index += 1

Solution (Python):
import sys

sentences = sys.stdin.readlines()

counter = {}
for c in range(ord('a'), ord('z') + 1):
    counter[chr(c)] = 0
for sentence in sentences:
    for c in sentence:
        if c.isalpha():
            if c.isupper():
                counter[c.lower()] += 1
            else:
                counter[c] += 1

for k, v in counter.items():
    print("{} : {}".format(k, v))

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

y = str.lower(input_str)
  

for char in 'abcdefghijklmnopqrstuvwxyz':
  print(char,":", y.count(char))

Solution (Python):

import sys
s = sys.stdin.read().lower()

char = "abcdefghijklmnopqrstuvwxyz"
for n in char:
  ans = s.count(n)
  print(n + " : "+str(ans))

Solution (Python):
import sys
 
s = ""
for line in sys.stdin:
    s += line
 
char = "abcdefghijklmnopqrstuvwxyz"
 
for c in char:
    n1 = s.count(c)
    n2 = s.count(c.upper())
    print(c + " : " + str(n1 + n2))

Solution (Python):
from string import ascii_lowercase, ascii_uppercase
s = open(0).read()
ans = [0]*26
for c in s:
    i = ascii_lowercase.find(c)
    if i > -1:
        ans[i] += 1
    i = ascii_uppercase.find(c)
    if i > -1:
        ans[i] += 1
for c, t in zip(ascii_lowercase, ans):
    print("%s : %d" % (c, t))

Solution (Python):
from string import ascii_lowercase, ascii_uppercase
s = open(0).read()
ans = [0]*26
for c in s:
    i = ascii_lowercase.find(c)
    if i > -1:
        ans[i] += 1
    i = ascii_uppercase.find(c)
    if i > -1:
        ans[i] += 1
for c, t in zip(ascii_lowercase, ans):
    print("%s : %d" % (c, t))

Solution (Python):
n=[0 for i in range(30)]

while True:
    try:
        s=input()
    except EOFError:
        break
    n[0]+=s.count('a')+s.count('A')
    n[1]+=s.count('b')+s.count('B')
    n[2]+=s.count('c')+s.count('C')
    n[3]+=s.count('d')+s.count('D')
    n[4]+=s.count('e')+s.count('E')
    n[5]+=s.count('f')+s.count('F')
    n[6]+=s.count('g')+s.count('G')
    n[7]+=s.count('h')+s.count('H')
    n[8]+=s.count('i')+s.count('I')
    n[9]+=s.count('j')+s.count('J')
    n[10]+=s.count('k')+s.count('K')
    n[11]+=s.count('l')+s.count('L')
    n[12]+=s.count('m')+s.count('M')
    n[13]+=s.count('n')+s.count('N')
    n[14]+=s.count('o')+s.count('O')
    n[15]+=s.count('p')+s.count('P')
    n[16]+=s.count('q')+s.count('Q')
    n[17]+=s.count('r')+s.count('R')
    n[18]+=s.count('s')+s.count('S')
    n[19]+=s.count('t')+s.count('T')
    n[20]+=s.count('u')+s.count('U')
    n[21]+=s.count('v')+s.count('V')
    n[22]+=s.count('w')+s.count('W')
    n[23]+=s.count('x')+s.count('X')
    n[24]+=s.count('y')+s.count('Y')
    n[25]+=s.count('z')+s.count('Z')

print(f"a : {n[0]}")
print(f"b : {n[1]}")
print(f"c : {n[2]}")
print(f"d : {n[3]}")
print(f"e : {n[4]}")
print(f"f : {n[5]}")
print(f"g : {n[6]}")
print(f"h : {n[7]}")
print(f"i : {n[8]}")
print(f"j : {n[9]}")
print(f"k : {n[10]}")
print(f"l : {n[11]}")
print(f"m : {n[12]}")
print(f"n : {n[13]}")
print(f"o : {n[14]}")
print(f"p : {n[15]}")
print(f"q : {n[16]}")
print(f"r : {n[17]}")
print(f"s : {n[18]}")
print(f"t : {n[19]}")
print(f"u : {n[20]}")
print(f"v : {n[21]}")
print(f"w : {n[22]}")
print(f"x : {n[23]}")
print(f"y : {n[24]}")
print(f"z : {n[25]}")

Solution (Python):
import sys
alp="abcdefghijklmnopqrstuvwxyz"

str=sys.stdin.read()
for i in alp:
	print(f"{i} : {str.lower().count(i)}")

Solution (Python):
alp = {chr(x): 0 for x in range(97, 123)}

while True:
    try:
        s = input().lower()
        for c in s:
            if c.isalpha():
                alp[c] += 1
    except EOFError:
        break

for k in alp:
    print(f'{k} : {alp[k]}')

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):
letters = "abcdefghijklmnopqrstuvwxyz"

table = [0]*26

while True:
    try:
        line = input()

        for i in line:
            index = 0
            for j in letters:
                if i == j or i == j.upper():
                    table[index]+=1
                index+=1
    except:
        break

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

Solution (Python):
import sys
import collections

c ={}
s = sys.stdin.read()
c = collections.Counter(s.lower())
for i in range(97,123):
    print(chr(i),":",c[chr(i)])

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):
s = open(0).read()
s = s.lower()
count = [0 for i in range(26)]
for i in range(len(s)):
    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):
import sys, string

lines = sys.stdin.read().lower()
for x in string.ascii_lowercase:
    print('{} : {}'.format(x, lines.count(x)))

Solution (Python):
import sys

c_dict = {
'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
}

while True:
    a = sys.stdin.readline()
    if not a:
        break
    else:
        str = a.lower() 
        for i in str: 
            if i in c_dict: 
                c_dict[i] = c_dict[i] + 1 
            """ 
            else:
                c_dict[i] = 1
            """

for i in c_dict:
    print(i,':',c_dict[i])

Solution (Python):


from collections import* 
from fractions import gcd
from functools import* 
from itertools import* 
from operator import mul
from bisect import* 
from heapq import* 
from math import factorial,pi
from copy import deepcopy
import sys

sys.setrecursionlimit(10**6)


def main():
    d=defaultdict(int)
    for i in open(0).read().lower():
        d[i]+=1
    for i in [chr(j)for j in range(97,123)]:
        print(i,":",d[i])
    
if __name__ == '__main__':
    main()

Solution (Python):
import fileinput


ALPHABET= "abcdefghijklmnopqrstuvwxyz"

dict_alphabet = {}

for key in ALPHABET:
    dict_alphabet[key] = 0



for line in fileinput.input():
    for letter in line.lower():
        if letter in dict_alphabet:
            dict_alphabet[letter] += 1



for key, value in dict_alphabet.items():

    print(f"{key} : {value}")

Solution (Python):
import sys
count={chr(97+i):0 for i in range(26)}
line=sys.stdin.read()
line=line.lower()

for i in range(len(line)):
    if line[i] in count:
        count[line[i]]+=1

for i in range(97,97+26):
    print(chr(i)+' : '+str(count[chr(i)]))

Solution (Python):
data = [0 for _ in range(26)]
while True:
    try:
        moji = input()
    except EOFError:
        break
    for m in moji:
        point = ord(m)
        if 65 <= point <= 90:
            data[point - 65] += 1
        elif 97 <= point <= 122:
            data[point - 97] += 1
[print(f'{chr(i + 97)} : {data[i]}') for i in range(26)]

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 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 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 sys

uppers = [chr(i) for i in range(65,65+26)]
lowers = [chr(i) for i in range(97,97+26)]
alphabet = lowers + uppers
count_dict = dict(zip(lowers , [0 for i in range(len(lowers))]))

sentence = sys.stdin.read()

for s in sentence:
    for a in alphabet:
        if s == a:
            count_dict[a.lower()] += 1

for key, value in count_dict.items():
    print(key, ":", value)

Solution (Python):
def count_char(chars):
    res = {chr(i): 0 for i in range(97, 123)}
    for c in chars.lower():
        if c in res:
            res[c] += 1
    return(res)


if __name__ == "__main__":
    
    s = ""
    while True:
        try:
            s += input()
        except:
           break

    for k, v in count_char(s).items():
        print(f"{k} : {v}")

Solution (Python):
from sys import stdin

S = stdin.read().lower()

alphabet = 'abcdefghijklmnopqrstuvwxyz'
count = [0] * len(alphabet)

for c in S:
    if c in alphabet:
        i = alphabet.index(c)
        count[i] += 1

for i in range(len(alphabet)):
    print(alphabet[i], ':', count[i])

Solution (Python):
import sys
alpha = "abcdefghijklmnopqrstuvwxyz"
str = sys.stdin.read()
str = str.lower()

for i in range(len(alpha)):
    print("{} : {}".format(alpha[i],str.count(alpha[i])))

Solution (Python):
nyuryoku = ""

try:
    while True:
        s = input()
        if s == '':
            break
        nyuryoku += s

except EOFError:
    pass

s = nyuryoku

a = "abcdefghijklmnopqrstuvwxyz"
alphabet = [0] * 26

for i in range(len(s)):
    for j in range(len(a)):
        if(s[i] == a[j] or s[i] == a[j].upper()):
            alphabet[j] += 1
            
for i in range(len(a)):
    print("{} : {}".format(a[i],alphabet[i]))

Solution (Python):
if __name__ == '__main__':
	string = "abcdefghijklmnopqrstuvwxyz"
	data = ""
	while True:
		try:
			data += str(input())
		except:
			break		
	for i in string:
		print("%s : %d" % (i ,data.lower().count(i)))

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):
import sys
s = sys.stdin.read().lower()
count = [0 for i in range(26)]
for j in s:
    num = ord(j) - ord('a')
    if num >= 0 and num <= 25:
        count[num] += 1
for k in range(26):
    print(chr(k + 97) + " : " + str(count[k]))

Solution (Python):
x = ''
while 1:
    try:
        x += input()
    except:
        break
    
str_a = [chr(i) for i in range(ord('a'), ord('z') + 1)]
str_A = [chr(i) for i in range(ord('A'), ord('Z') + 1)]
count = [0] * 26
for i in x:
    if i in str_a:
        count[str_a.index(i)] += 1
    elif i in str_A:
        count[str_A.index(i)] += 1
for i, j in zip(str_a, count):
    print('{} : {}'.format(i, j))

Solution (Python):
import collections
import sys
c = collections.Counter(''.join(sys.stdin).lower())
for x in 'abcdefghijklmnopqrstuvwxyz':
	print(x,':',c[x])

Solution (Python):
import sys
lines = '' 
for line in sys.stdin.readlines():
    if not line:
        break
    else:
        lines += line.lower()

a = ord('a')
z = ord('z')
n = z - a + 1
lis1 = list(map(chr, (_ for _ in range(a, z+1))))
lis2 = [0]*n
d = dict(zip(lis1, lis2))
for c in lines:
        if c in lis1:
            d[c] += 1
for i in d:
    print('{} : {}'.format(i, d[i]))

Solution (Python):
s = []
a=list('abcdefghijklmnopqrstuvwxyz')
while 1:
    try:
        x=input()
    except EOFError:
        break
    s+=list(x.lower())
for i in a:
    print('{} : {}'.format(i, s.count(i)))

Solution (Python):
import sys
import string
lower_case = string.ascii_lowercase

alphabets = {}
for letter in lower_case:
     alphabets.setdefault(letter, 0)

string = []
for line in sys.stdin:
    string.append(line)

for line in string:
    for letter in line:
        lower_letter = letter.lower()
        try :
            alphabets[lower_letter] += 1
        except:
            pass

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

Solution (Python):
import string
import sys

number = []

all = list(string.ascii_lowercase)

for i in range(26):
    number.append(0)

moji = sys.stdin.read()
T = list(moji.lower())

for i in range(26):
    for j in range(len(moji)):
        if T[j] == all[i]:
            number[i] += 1

for i in range(26):
    print(all[i], ":", number[i])

Solution (Python):
import sys

table = [0]*26
letters = 'abcdefghijklmnopqrstuvwxyz'

input_str = sys.stdin.read()

for i in range(len(input_str)):
    for j in range(len(letters)):
        if input_str[i] == letters[j] or input_str[i] == letters[j].upper():
            table[j] += 1

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

Solution (Python):




alphabet = "abcdefghijklmnopqrstuvwxyz"
ansdict = {}
data = ""

try:
    while 1:
        data += input()        
except EOFError:
    pass

data = data.lower()

for i in data:
    if i in ansdict.keys():
        ansdict[i] += 1
    else:
        ansdict[i] = 1
for i in alphabet:
    print("{} : {}".format(i, ansdict.get(i, 0)))

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 string
import sys
A = list(string.ascii_lowercase)
l = ""
for i in sys.stdin:
    l += i
L = l.lower()
for i in A:
    counter = L.count(i)
    print(i,":",counter)

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]))