-Code
case = 0
while 1:
case += 1
nums = list(map(float, input().split()))
if nums[0] == 0:
break
nums = nums[1:]
lenth = len(nums) // 2
res = nums[lenth] if len(nums) % 2 == 1 else (nums[lenth] + nums[lenth - 1]) / 2
print(f"Case {case}: {res}")
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬] 27465번 소수가 아닌 수 (0) | 2023.02.17 |
---|---|
[백준/파이썬] 27159번 노 땡스! (0) | 2023.02.16 |
[백준/파이썬] 27245번 Комната (0) | 2023.02.14 |
[백준/파이썬] 26340번 Fold the Paper Nicely (0) | 2023.02.13 |
[백준/파이썬] 5358번 Football Team (0) | 2023.02.12 |