본문 바로가기

BOJ 1076번 : 저항 본문

BOJ

BOJ 1076번 : 저항

00rigin 2020. 3. 15. 17:12

문자열 처리는 역시 파이썬이 쉽다....

갓이썬.....

 

<소스코드>

1
2
3
4
arr = ["black","brown","red""orange""yellow""green""blue""violet""grey""white"]
res = []
for i in range(3): res.append(arr.index(input()))
print(int(str(res[0])+str(res[1]))*(10**res[2]))
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter

문제 :

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

 

1076번: 저항

첫째 줄에 첫 번째 색, 둘째 줄에 두 번째 색, 셋째 줄에 세 번째 색이 주어진다. 색은 모두 위의 표에 쓰여 있는 색만 주어진다.

www.acmicpc.net

 

'BOJ' 카테고리의 다른 글

BOJ 2293번 : 동전 1  (0) 2020.03.15
BOJ 1002번 : 터렛  (0) 2020.03.15
BOJ 2225번 : 합분해  (0) 2020.03.15
BOJ 9251번 : LCS  (0) 2020.03.15
BOJ 2565번 : 전깃줄  (0) 2020.03.15
Comments