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 = input()
s = sys.stdin.read()
#print(s)
CH = [0 for _ in range(26)]
for i in s:
    asc = ord(i)
    if 65 <= asc <= 90:
        CH[asc - 65] += 1
    elif 97 <= ord(i) <= 122:
        CH[asc - 97] += 1
for i in range(26):
    print(f'{chr(97+i)} : {CH[i]}')

Submission status: Accepted

Solution code:
import sys
import string
li = []
for l in sys.stdin:
    for ll in list(l.lower()):
        li.append(ll)

d = dict([(x, 0) for x in string.ascii_lowercase])

for i in li:
    if i in d:
        d[i] += 1

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

Submission status: Accepted

Solution code:
import sys

alpha = [0] * 26
buf = sys.stdin.read()
buf_len = len(buf)

for i in range(buf_len):
    c = buf[i].lower()
    ascii_code = ord(c)

    if ord('a') <= ascii_code <= ord('z'):
        alpha[ascii_code - ord('a')] += 1

for i in range(26):
    ascii_code = ord('a') + i
    print("%s : %d" % (chr(ascii_code), alpha[i]))

Submission status: Accepted

Solution code:
import sys


def resolve():
    alphabets = dict([(chr(c), 0) for c in range(ord('a'), ord('z') + 1)])

    for line in sys.stdin:
        for c in list(line):
            if c.isalpha():
                alphabets[c.lower()] += 1

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


resolve()

Submission status: Accepted

Solution code:
alph = "abcdefghijklmnopqrstuvwxyz"
ans = [0] * 26
while True:
    s = input()
    t = s[-3:] if len(s) >= 3 else s

    for x in s.lower():
        if alph.find(x) >= 0:
            ans[alph.find(x)] += 1
            
    if t == "z" or t == '"""' or t == "nt." or t == "en.":
        break

for al, num in zip(alph, ans):
    print(f'{al} : {num}')

Submission status: Accepted

Solution code:
slst = []
while True:
    try:
        slst.append(input())
    except:
        break
sen = ' '.join(slst)
sen = sen.lower()
alf = ['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(f'{alf[i]} : {sen.count(alf[i])}')

Submission status: Accepted

Solution code:
import sys

text = [line.lower().split() for line in sys.stdin.readlines()]
new_text = "".join([line for inner in text for line in inner])
keys = [chr(ord("a") + i) for i in range(26)]
values = [0] * 26
alpha = dict(zip(keys, values))

for c in alpha:
    alpha[c] = new_text.count(c)

for key, value in alpha.items():
    print("{0} : {1}".format(key, value))

Submission status: Accepted

Solution code:
import re
a = [chr(i) for i in range(ord('a'), ord('z')+1)]
l = [0] * len(a)
while True:
  try:
    s = str(input())
  except:
    break
  for c in s:
    p = 0
    if re.match(r'^[a-zA-Z]$', c):
      p = a.index(c.lower())
      l[p] += 1

for i in range(len(a)):
  print("{0} : {1}".format(a[i], l[i]))

Submission status: Accepted

Solution code:
import sys
alphabet='abcdefghijklmnopqrstuvwxyz'
dic={}
for i in alphabet:
  dic[i]=0


s=''
for i in sys.stdin.read():
  s+=i
s=s.lower()

for i in s:
  if i in alphabet:
    dic[i]+=1

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

Submission status: Accepted

Solution code:
#-*-coding:utf-8-*-

import sys

def main():
    ans_list=[0]*26
    for line in sys.stdin:
        for s in line:
            if s.isupper()==True:
                s=s.lower()
            if ord(s)<97 or ord(s)>122:
                continue
            else:
                ans_list[ord(s)-97]+=1
    for idx,ans in enumerate(ans_list):
        print("{} : {}".format(chr(97+idx),ans))

if __name__=="__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import OrderedDict
import sys


def is_alphabet(s):
    if (0x41 <= ord(s) and ord(s) <= 0x5A) or (0x61 <= ord(s) and ord(s) <= 0x7A):
        return True
    else:
        return False


d = OrderedDict()
for i in range(0x61, 0x7B):
    d[chr(i)] = 0

S = sys.stdin.read().strip()
for s in S:
    if is_alphabet(s):
        d[s.lower()] += 1

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

Submission status: Accepted

Solution code:
import sys
a = sys.stdin.read().lower()
c = {}
for i in range(26):
    c[chr(ord('a')+i)] = 0
for i in a:
    if c.get(i) is None:
        continue
    else:
        c[i] += 1
for i in range(26):
    print(chr(ord('a')+i) + ' : ' + str(c[chr(ord('a')+i)]))

Submission status: Accepted

Solution code:
import sys

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

word = "".join(lines)
alphabet = "abcdefghijklmnopqrstuvwxyz"
cnt = {key: 0 for key in alphabet}
for ch in word:
    ch = ch.lower()
    if ch not in alphabet:
        continue
    cnt[ch.lower()] += 1

for key, value in cnt.items():
    print(f"{key} : {value}")

Submission status: Accepted

Solution code:
C=[]
while True:
    try:
        B=input()
        B=B.lower()
        C.append(B)
    except EOFError:
        break
    A="".join(C)
print('a',':',A.count('a'))
print('b',':',A.count('b'))
print('c',':',A.count('c'))
print('d',':',A.count('d'))
print('e',':',A.count('e'))
print('f',':',A.count('f'))
print('g',':',A.count('g'))
print('h',':',A.count('h'))
print('i',':',A.count('i'))
print('j',':',A.count('j'))
print('k',':',A.count('k'))
print('l',':',A.count('l'))
print('m',':',A.count('m'))
print('n',':',A.count('n'))
print('o',':',A.count('o'))
print('p',':',A.count('p'))
print('q',':',A.count('q'))
print('r',':',A.count('r'))
print('s',':',A.count('s'))
print('t',':',A.count('t'))
print('u',':',A.count('u'))
print('v',':',A.count('v'))
print('w',':',A.count('w'))
print('x',':',A.count('x'))
print('y',':',A.count('y'))
print('z',':',A.count('z'))

Submission status: Accepted

Solution code:
i=[]
while True:
    try:
        i += input().lower()

    except Exception:
        break

letters = "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"
list1 = letters.split()

for j in range(len(list1)):

    print("{0} : {1}".format(list1[j], i.count(list1[j])))

Submission status: Accepted

Solution code:
a=''
while True:
    try:
        a+=input().lower()
    except EOFError:
        break
    a=list(a)
for i in range(ord('a'),ord('z')+1):
    print(chr(i),end='')
    print(' : ',end='')
    k=0
    for j in range((len(a))):
        if a[j]==chr(i):
            k+=1
    print(k)

Submission status: Accepted

Solution code:
l = list([0] * 26)
while True:
    try:
        s =input().lower()
    except EOFError:
        break
    for i in range(len(s)):
        t = ord(s[i]) - ord('a')
        if t>=0 and t<26:
            l[t] += 1
            
for i in range(26):
    print(f'{chr(i + 97)} : {l[i]}')

Submission status: Accepted

Solution code:
import string
a = ""


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


for i in string.ascii_lowercase:
    print(f"{i} : {a.count(i)}")

Submission status: Accepted

Solution code:
import sys
cnt = {}
for line in sys.stdin:
    for c in list(line.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:
#54 文字のカウント

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

a='abcdefghijklmnopqrstuvwxyz'
b=[0]*26
while True :
    try:
        moji=(input())
        for i in range (len(moji)) :
            if moji[i].lower() in a :
                b[a.index(moji[i].lower())] += 1
        
            
    except EOFError:
        break


for k in range(26) :
    print(a[k], ":", b[k])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=[]
y=[]
z=[]
while True:
    try:
        n=input()
    except EOFError:
        break
    
    
    #print(ord('T'))
    #print(ord('t'))
    
    for i in n.lower():
        x.append(ord(i))
    #print(x)
    
    
    for k in range(27):
        y.append(97+k)
    #print(y)
    
    
for l in y:
    if x.count(l)==0:
        z.append(0)
    elif x.count(l)!=0:
        z.append(x.count(l))
#print(z)
    
    
for m in range(26):
    print(chr(m+97),end=' ')
    print(':',end=' ')
    print(z[m])

Submission status: Accepted

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

s = str.lower(input_str)

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

Submission status: Accepted

Solution code:
s = []
while True:
    try:
        s += input().lower()

    except EOFError:
        break

letters = "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"
list1 = letters.split()

for j in range(len(list1)):

    print("{0} : {1}".format(list1[j], s.count(list1[j])))

Submission status: Accepted

Solution code:
import sys
s = sys.stdin.read().lower()
for c in map(chr, range(97,123)): print(f"{c} : {s.count(c)}")

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
table = [0 for i in range(26)]
#input_str = input()
input_str = sys.stdin.read()

for i in input_str:
    index = 0
    for j in letters:
        #print(i, j)
        if i == j:
            table[index % 26] += 1
        index += 1

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

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}")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = [chr(ord('a') + i) for i in range(26)] #a-zまでのリストを作るやつなんでそうなるのか後で聞く
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))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from sys import stdin

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

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

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())
  # print(b)
  # print(len(b))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import string
def run():
    letter_list=[] #appendのために宣言が必要
    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()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# 54
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)
    #print(A)
    #print(A.count(120))
for i in range(97,123):
        #print(i)
    k = A.count(i)
    c.append(k)
        #print(i,k)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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