(D3)6692. 다솔이의 월급 상자

·2023년 5월 20일

SWEA

목록 보기
44/46

출처 :sw expert academy

T = int(input())
# 여러개의 테스트 케이스가 주어지므로, 각각을 처리합니다.
for test_case in range(1, T + 1):
    n = int(input())
    s = 0
    for i in range(n):
        x, y = map(float, input().split())
        s += x*y
    print("{:.6f}".format(s))

소수점 N자리까지 출력
"{:.Nf}".format(숫자)
round(숫자)반올림
maht.ceil 올림
math.floor 내림
math.trunc 소수점 버리기

profile
🐥

0개의 댓글