728x90
반응형

2845 진법 변

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

 

2745번: 진법 변환

B진법 수 N이 주어진다. 이 수를 10진법으로 바꿔 출력하는 프로그램을 작성하시오. 10진법을 넘어가는 진법은 숫자로 표시할 수 없는 자리가 있다. 이런 경우에는 다음과 같이 알파벳 대문자를 

www.acmicpc.net

 

import sys

N,B = list(map(str,sys.stdin.readline().rstrip().split()))

print(int(N , int(B)))

==> int 문 (변환 할 값 , 변환 할 값의 진수)

728x90
반응형

+ Recent posts