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



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

Submission status: Accepted

Solution code:
import sys
s=sys.stdin.read().lower()
a=[print(i,':',s.count(i)) for i in map(chr,range(97,123))]

Submission status: Accepted

Solution code:
num_of_alpha = dict()

for i in range(97, 123):
    num_of_alpha[chr(i)] = 0

while True:
    try:
        x = input().lower()
        for i in range(len(x)):
            if x[i].isalpha():
                num_of_alpha[x[i]] += 1
    except:
        break

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

Submission status: Accepted

Solution code:
import sys 
dic = {}
for i in range(97, 123):
    dic[chr(i)] = 0 

for i in sys.stdin:
    for s in i.lower():
        if s in dic:
            dic[s] += 1

for s in dic.items():
    print(s[0],":",s[1])

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")

def main():
    #h0,w0h1,w1 = map(int, input().split())
    s=sys.stdin.read()
    chr_n=[0]*26
    for c in s:
        if c.isupper():c=c.lower()
        if not c.islower():continue
        chr_n[ord(c)-97]+=1
    for oc in range(26):
        print("{} : {}".format(chr(oc+97),chr_n[oc]))

main()

Submission status: Accepted

Solution code:
dic = {'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:
    try:
        S = input()

    except:
        break

    for s in S:
        for i in range(len(s)):
            if s[i].lower() in dic:
                dic[s[i].lower()] += 1


for k in dic:
    print("{} : {}".format(k, dic[k]))

Submission status: Accepted

Solution code:
import string
import sys

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

A = string.ascii_lowercase
for a in A:
    cnt = T.count(a)
    print(f"{a} : {cnt}")

Submission status: Accepted

Solution code:
list = [0 for i in range(26)]

alpha = "abcdefghijklmnopqrstuvwxyz"

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

 for i in range(len(sent)):
  for j in range(26):
   if sent[i] == alpha[j]:
    list[j] += 1

for i in range(26):
 print(alpha[i],":",list[i])

Submission status: Accepted

Solution code:
from string import ascii_lowercase 

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

d = {a:0 for a in ascii_lowercase}
for s in S:
    if s in d:
        d[s] += 1

for a in ascii_lowercase:
    print('{} : {}'.format(a, d[a]))

Submission status: Accepted

Solution code:
alphabet="abcdefghijklmnopqrstuvwxyz"
line=""
while 1:
    try:
        line+=input().lower()
    except EOFError:
            break

for c in alphabet:
    print(c+ " : " + str(line.count(c)))

Submission status: Accepted

Solution code:
alphabets={}
for i in range(97,97+26):
    alphabets[str(chr(i))]=0
while True:
    try:S=input()
    except:break
    for s in S:
        if s.lower() in alphabets:
            s=s.lower()
            alphabets[s]+=1

for key,value in alphabets.items():
    print(key +' : ' + str(value))

Submission status: Accepted

Solution code:
import sys
import string
from collections import Counter

cnt = Counter(open(0).read().lower())
for c in string.ascii_lowercase:
    print("{} : {}".format(c, cnt[c]))

Submission status: Accepted

Solution code:
x = [0 for i in range(26)]
while True:
    try:
        s  = input().lower()
    except:
        break
    for i in range(len(s)):
        t = ord(s[i])-ord("a")
        if (t>=0 and t<26) :
            x[t] += 1

for i in range(26):
    print(f"{chr(97+i)} : {x[i]}")

Submission status: Accepted

Solution code:
import sys
x=sys.stdin.read()
x=x.lower()
final=[0 for i in range(26)]
for i in x:
    k=ord(i)-97
    if k>=0 and k<=25:
        final[k]+=1
for i,v in enumerate(final):
    print(chr(i+97)+' : '+str(v))

Submission status: Accepted

Solution code:
alp = {"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:
    try:
        s = input()
    except EOFError:
        break

    for i in s:
        if alp.get(i.lower()) != None:
            alp[i.lower()] += 1

for key, value in alp.items():
    print(key,':', value)

Submission status: Accepted

Solution code:
import sys

table = [0] * 26
input_str = sys.stdin.read()
letters ="abcdefghijklmnopqrstuvwxyz"

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

Submission status: Accepted

Solution code:
counts = []
for i in range(0,26):
    counts.append(0)

try:
    s = input()
    while(len(s)>0):
        for _ in s[:]:
            #print(_)
            if('a' <= _ and _ <= 'z'):
                counts[ord(_)-ord('a')]+=1
            elif('A' <= _ and _ <= 'Z'):
                counts[ord(_)-ord('A')]+=1
        s = input()
except EOFError:
    pass

for c in range(ord('a'), ord('z')+1):
    print('{} : {}'.format(chr(c), counts[c - ord('a')]))

Submission status: Accepted

Solution code:
import sys

a=sys.stdin.read()

alpha="abcdefghijklmnopqrstuvwxyz"
counter=[0]*26

for i in a:
    for j in alpha:
        if i==j or i==j.upper():
            counter[alpha.index(j)]+=1
            break

for i in alpha:
    print(i,":",counter[alpha.index(i)])

Submission status: Accepted

Solution code:
import sys
cnt = {}
for e in sys.stdin:
    for c in list(e.lower()):
        cnt[c] = cnt.get(c, 0) + 1

for c in range(ord('a'), ord('z')+1):
    print(chr(c), ':', cnt.get(chr(c), 0))

Submission status: Accepted

Solution code:
wordDic={}

for ascii in range(97, 123):
    wordDic[chr(ascii)]=0

while True:
    try:
        word = input().lower()
        for key in wordDic:
            for char in range(len(word)):
                if key==word[char]:
                    wordDic[key]=wordDic[key]+1
    except EOFError:
        break
    
for key in wordDic:
    print(key+" : "+str(wordDic[key]))
    
#reading lines by EOF in Python is not identical to doing it in C or C+++, I think this is one of the most simple or intuitive.

Submission status: Accepted

Solution code:
ans = {chr(i): 0 for i in range(97, 97 + 26)}
while True:
    try:
        s = input()
    except BaseException:
        break
    s = s.lower()
    for si in s:
        if si.isalpha():
            ans[si] += 1

for x, y in ans.items():
    print(x, ':', y)

Submission status: Accepted

Solution code:
import sys
table = [0]*26

alphabet = "abcdefghijklmnopqrstuvwxyz"
#big_alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
while True:
    try:
        line=input().lower()
        for s in line:
            for  i in range(len(alphabet)):
                #print(alphabet[i],s)
                if s == alphabet[i]:
                    table[i] +=1
                    #rint(table[i])
    except:
        break

for i in range(len(alphabet)):
    print(f'{alphabet[i]} : {table[i]}')

Submission status: Accepted

Solution code:
import re
count = {}
alphabet = list("abcdefghijklmnopqrstuvwxyz")
while True:
    try:
        s = re.sub("[^a-z]", "", input().lower())
    except:
        break
    for abc in alphabet:
        tmp = count.setdefault(abc, 0)
        count[abc] = tmp + s.count(abc)
for abc in alphabet:
    print(abc + " : " + str(count[abc]))

Submission status: Accepted

Solution code:
import sys
alphabet = "abcdefghijklmnopqrstuvwxyz"
list = []
for i in sys.stdin:
    list.append(i)
list = ''.join(list)
list = list.lower()
for c in alphabet:
    count = list.count(c)
    print(f'{c} : {count}')

Submission status: Accepted

Solution code:
map="abcdefghijklmnopqrstuvwxyz"
count=[0 for i in range(len(map))]

lines=[]

try:
    while True:
        line=input()
        if line=="":
            break
        
        if len(line)==0:
            break
        else:
            lines+=line

except EOFError:
    pass
            
for i in range(len(map)):
    for j in range(len(lines)):
        if map[i]==lines[j].lower():
            count[i]+=1
    print("{} :".format(map[i]),count[i])

Submission status: Accepted

Solution code:
s=""
while True:
  try:
    s+=input()
  except:
    break
for i in range(97,123):
  x=chr(i)
  X=x.upper()
  c=s.count(x)+s.count(X)
  print(x,":",str(c))

Submission status: Accepted

Solution code:
results = {chr(c): 0 for c in range(ord('a'), ord('a')+26)}

while True:
    try:
        line = input()
    except EOFError:
        break
    for c in line:
        c_lowered = c.lower()
        if c_lowered in results:
            results[c_lowered] += 1


for key in range(ord('a'), ord('a')+26):
    key_str = chr(key)
    print(f'{key_str} : {results[key_str]}')

Submission status: Accepted

Solution code:
dic={chr(i):0 for i in range(97,97+26)}
while 1:
    try:
        s=input().lower()
        for i in s:
            if i in dic:dic[i] +=1
    except:break
for x,y in dic.items():
    print(x,":",y)

Submission status: Accepted

Solution code:
import string
counter = [0 for i in range(26)]
while True:
    try:
        Sen = input()
    except:
        break
    for i,alp in enumerate(string.ascii_lowercase):
        counter[i] += Sen.count(alp)+Sen.count(alp.swapcase())
for i,alp in enumerate(string.ascii_lowercase):
    print(alp + " : " + str(counter[i]))

Submission status: Accepted

Solution code:
#1文とは限らない
alp ="abcdefghijklmnopqrstuvwxyz"

import sys

inpt = []
for _ in sys.stdin:
    inpt.append(_.lower())
#print(inpt)

ans = [0]*26

for strng in inpt:
    for i in range(len(strng)):
        for j in range(26):
            if strng[i] == alp[j]:
                ans[j] += 1
            
for j in range(26):
    print(alp[j],":",ans[j])

Submission status: Accepted

Solution code:
import sys
from string import ascii_lowercase

str = sys.stdin.read().lower()
for i in ascii_lowercase:
    print('{} : {}'.format(i, str.count(i)))

Submission status: Accepted

Solution code:
import sys
# counter dictionary
c_dict = 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)

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

# loop
for ch in text:
    ch = ch.lower()
    if ch in c_dict:
        c_dict[ch] += 1

# output
for k, v in c_dict.items():
    print('{} : {}'.format(k, v))

Submission status: Accepted

Solution code:
import string

alphabets = {}

for i in string.ascii_lowercase:
    alphabets[i] = 0

try:
    while True:
        string = str.lower(input())
        
        for i in range(len(string)):
            if string[i] in alphabets:
                alphabets[string[i]] += 1
        
except Exception:
    for i, j in alphabets.items():
        print('{} : {}'.format(i, j))

Submission status: Accepted

Solution code:
from string import ascii_lowercase
from sys import stdin
from collections import Counter

c = Counter("".join(stdin).lower())
for i in ascii_lowercase:
    print("{} : {}".format(i, c[i]))

Submission status: Accepted

Solution code:
A = []
while True:
    try:
        n = input()
        if n == "":
            break
    except:
        break
    nn = len(n)
    
    for i in range(nn):
        n_l = n.lower()
        A.append(n_l[i])
  
for i in range(ord("a"),ord("z")+1):
    print(chr(i),":",A.count(chr(i)))

Submission status: Accepted

Solution code:
import sys

alpha = 'abcdefghijklmnopqrstuvwxyz'
dic = {c: 0 for c in alpha}
s = ''.join(sys.stdin.readlines()).lower()

for c in s:
    if c in alpha:
        dic[c] += 1

for c in alpha:
    print(f'{c} : {dic[c]}')

Submission status: Accepted

Solution code:
import sys

l=[0 for i in range(26)]
for e in sys.stdin:
    for c in e:
        if str.isupper(c) or str.islower(c):
            l[ord(str.lower(c))-ord('a')]+=1
for i in range(26):
    print(chr(i+ord('a')),l[i],sep=' : ')

Submission status: Accepted

Solution code:
import sys
anw = {}
for line in sys.stdin.readlines():
    for _ in line:
        if _.lower() in anw:
            anw[_.lower()] += 1
        else:
            anw[_.lower()] = 1

for _ in 'abcdefghijklmnopqrstuvwxyz':
    if _ not in anw:
        print(_,":","0")
    else:
        print(_,":",anw[_])

Submission status: Accepted

Solution code:
import fileinput

dic = { '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}
vs = []

for line in fileinput.input():
    vs.append(line.strip())

for v in vs:
    for c in v:
        if c.lower() in dic:
            dic[c.lower()] += 1

for d in dic.items():
    print('{} : {}'.format(d[0], d[1]))

Submission status: Accepted

Solution code:
import sys
alph = list("abcdefghijklmnopqrstuvwxyz")
sentence = list(sys.stdin.read().lower())
for i in alph:
    print("%s :" % i, sentence.count(i))

Submission status: Accepted

Solution code:
#import pysnooper
import os,re,sys,operator,math,heapq,string
#from collections import Counter,deque
#from operator import itemgetter
#from itertools import accumulate,combinations,groupby,combinations_with_replacement
from sys import stdin,setrecursionlimit
#from copy import deepcopy

setrecursionlimit(10**6)
#input=stdin.readline


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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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])

Submission status: Accepted

Solution code:
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}")

Submission status: Accepted

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

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

#print(list)

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

Submission status: Accepted

Solution code:
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="")

Submission status: Accepted

Solution code:
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]}")

Submission status: Accepted

Solution code:
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]}")

Submission status: Accepted

Solution code:
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)):

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

			#Big character
			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()

Submission status: Accepted

Solution code:
#coding: utf-8

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

Submission status: Accepted

Solution code:
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 = '' )

Submission status: Accepted

Solution code:
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])))

Submission status: Accepted

Solution code:
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])

Submission status: Accepted

Solution code:
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]))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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]}")

Submission status: Accepted

Solution code:
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 = '' )

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#c=input()
import sys
s = sys.stdin.read().lower()
#print(s)
char = "abcdefghijklmnopqrstuvwxyz"
for n in char:
  ans = s.count(n)
  print(n + " : "+str(ans))

Submission status: Accepted

Solution code:
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]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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]))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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=" : ")

Submission status: Accepted

Solution code:
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]))

Submission status: Accepted

Solution code:
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]))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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])))

Submission status: Accepted

Solution code:
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])

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
s = sys.stdin.read().lower() # 1行の入力/小文字
for i in range(97,123):
    print(chr(i),':',s.count(chr(i))) #アスキーコードから文字へ

Submission status: Accepted

Solution code:
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]))

Submission status: Accepted

Solution code:
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)}")

Submission status: Accepted

Solution code:
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)))

Submission status: Accepted

Solution code:
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")]))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
alpha = 'abcdefghijklmnopqrstuvwxyz'
text = ''

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

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

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

Solution code:
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])

Submission status: Accepted

Solution code:
# coding=utf-8

###
### for atcorder program
###

import sys

# math class
class mymath:
    ### pi
    pi = 3.14159265358979323846264338

    ### Prime Number
    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

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

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

    ### Mat Multiplication
    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()

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

output = output()

### input sample
#i = input()
#N = int(input())
#A, B, C = [x for x in input().split()]
#N, K = [int(x) for x in input().split()]
#inlist = [int(w) for w in input().split()]

#R = float(input())
#A.append(list(map(int,input().split())))

#for line in sys.stdin.readlines():
#    x, y = [int(temp) for temp in line.split()]

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

### output sample
#print("{0} {1} {2:.5f}".format(A//B, A%B, A/B))
#print("{0:.6f} {1:.6f}".format(R*R*math.pi,R*2*math.pi))
#print(" {}".format(i), end="")

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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

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

y = str.lower(input_str)
  

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

Submission status: Accepted

Solution code:
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))