일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Unable to create a new virtual machine: No permission to perform this operation.
- 장치에 남은 공간이 없음
- svn: Can't find a temporary directory: Internal error
- histoy옵션
- 버프스위트
- i-node full
- burpsuite
- AWS 시험후기
- Default 생성
- uptime -s
- Default 삭제
- Default vpc
- 리눅스 telnet
- root로그인안됨
- Burp Suite
- 패키지 출력
- pam_tally2.so
- uptime -p
- HISTTIMEFORMAT
- rm -f
- 프리티어 비용 발생
- uptime -V
- 버프슈트
- 모바엑스텀 설치
- aws 자격증 접수 오류
- CentOS-Base.repo
- AWS
- ln -Tfs
- pam_tally -u -r
- pam_tally -u
Archives
- Yesterday
- Today
- Total
코드업(CodeUp) 기초 100제(6027) - 파이썬(Python) 본문
728x90
반응형
1. 6027 : [기초-출력변환] 10진 정수 입력받아 16진수로 출력하기1(설명)(py)
1_1) 아래 경로로 접속합니다.
경로 : https://codeup.kr/problem.php?id=6027
문제 설명 |
10진수를 입력받아 16진수(hexadecimal)로 출력해보자.(소문자) |
입력 |
10진수 1개가 입력된다. |
출력 |
16진수(소문자) 형태로 출력한다. |
입력 예시 |
255 |
출력 예시 |
ff |
내 답안 |
num1 = int(input())
print('%x'%num1)
모범 답안 |
a=input()
a=int(a)
print("%x"%a)
참고 |
입력값을 정수로 받기 위해서 input() 함수를 int() 함수에 넣었습니다. int(input()) 16진수로 출력하기 위해서 %x를 사용했습니다.(소문자 출력 %x, 대문자 출력 %X) |
728x90
반응형
'Python > Python 코딩테스트' 카테고리의 다른 글
코드업(CodeUp) 기초 100제(6029) - 파이썬(Python) (0) | 2021.08.16 |
---|---|
코드업(CodeUp) 기초 100제(6028) - 파이썬(Python) (0) | 2021.08.15 |
코드업(CodeUp) 기초 100제(6026) - 파이썬(Python) (0) | 2021.08.13 |
코드업(CodeUp) 기초 100제(6025) - 파이썬(Python) (0) | 2021.08.12 |
코드업(CodeUp) 기초 100제(6024) - 파이썬(Python) (0) | 2021.08.11 |
Comments