[백준] 16968번 : 차량 번호판 1 - Python(파이썬)

강재원·2022년 12월 9일
0

[코딩테스트] Python

목록 보기
199/200



https://www.acmicpc.net/problem/16968

arr=input()
count=1
for i in range(len(arr)):
    if i==0:
        if arr[i]=='c': count*=26
        else: count*=10
    else:
        if arr[i]==arr[i-1]:
            if arr[i]=='c': count*=25
            else: count*=9
        else:
            if arr[i]=='c': count*=26
            else: count*=10
print(count)
profile
개념정리 & 문법 정리 & 알고리즘 공부

0개의 댓글