[코드업] 6081 16진수 구구단

cheeeese·2022년 1월 30일
0

코딩테스트 연습

목록 보기
33/151
post-thumbnail

📖 문제

https://codeup.kr/problem.php?id=6081

💻 코드

n=int(input(), 16)

for i in range(1, 16):
   print('%X'%n,'*%X'%i, '=%X'%(i*n), sep='')

➕ 풀이

n=int(input(), 16)

-> 16진수 입력 받음

2진수와 8진수도 마찬가지로 가능

a = int(input(), 2) 
a = int(input(), 8)

0개의 댓글