본문 바로가기
python-algorithm

백준 26500 Absolutely

by 무적김두칠 2022. 12. 24.

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

 

26500번: Absolutely

The first line contains a single positive integer, n, indicating the number of data sets. Each data set is on a separate line and contains two values on the number line, separated by a single space.

www.acmicpc.net

 

1
2
3
4
5
6
7
8
9
def sol(a, b):
    answer = max(a,b) - min(a,b)
    return answer
 
if __name__ == '__main__':
    n = int(input())
    for _ in range(n):
        a, b = map(float, input().split())
        print('%.1f'%sol(a, b))
cs
반응형

'python-algorithm' 카테고리의 다른 글

백준 26731 Zagubiona litera  (0) 2022.12.24
백준 26532 Acres  (0) 2022.12.24
백준 26766 Serca  (0) 2022.12.24
백준 6888 Terms of Office  (0) 2022.12.23
백준 26546 Reverse  (0) 2022.12.23

댓글