https://www.acmicpc.net/problem/2386
result =[]
while(1):
cnt=0
inp=input()
if inp =="#":
break
for i in inp:
if i ==inp[0] or i==inp[0].upper():
cnt+=1
result.append([inp[0],cnt-1])
for i in result:
print(i[0],i[1])
'자기개발👨💻 > 코딩 알고리즘' 카테고리의 다른 글
[python] 백준 1547 공 (0) | 2020.08.29 |
---|---|
[python] 백준 1264 모음의 개수 (0) | 2020.08.29 |
[python] 백준 1259 팰린드롬수 (0) | 2020.08.29 |
[python] 백준 2588 곱셈 (0) | 2020.08.29 |
[python] 백준 1789 블랙잭 (0) | 2020.08.29 |
[python] 백준 2607 로마 숫자 (실패70 성공 20 ?? 10) (0) | 2020.08.27 |