-
백준 2869번(python)-달팽이는 올라가고 싶다프로그래밍/Algorithm 2020. 11. 4. 21:07728x90
반올림,올림,내림
올림,내림은 math모듈 가져와야함
import math
n=4.234
올림:math.ceil(n)
5
내림:math.floor(n)
4
반올림:round(n,2)
4.23
반응형'프로그래밍 > Algorithm' 카테고리의 다른 글
백준 1193번(python)-분수찾기 (0) 2020.11.06 백준 10872(python) -팩토리얼 (0) 2020.11.05 백준 2839번(python)-설탕 배달 (0) 2020.11.03 백준1712번(python)-손익분기점 (0) 2020.11.02 백준1316번(python)-복습요망 (0) 2020.11.02 댓글