728x90
[๋ฌธ์ ๋งํฌ] ๐
SW Expert Academy
SW ํ๋ก๊ทธ๋๋ฐ ์ญ๋ ๊ฐํ์ ๋์์ด ๋๋ ๋ค์ํ ํ์ต ์ปจํ ์ธ ๋ฅผ ํ์ธํ์ธ์!
swexpertacademy.com
ํ์ด
40์ ๋ฏธ๋ง์ด๋ฉด 40์ ์ ๋์ ํ๊ณ , 40์ ์ด์์ด๋ฉด ํด๋น ์ ์๋ฅผ ๋์ ํ๋ค.
๋์ ํ ์ ์๋ฅผ 5๋ก ๋๋๊ณ intํ์ผ๋ก ๋ณํํ๋ค.
Solution
test_case = int(input())
for tc in range(1, test_case + 1):
score = list(map(int, input().split()))
result = 0
for i in score:
if i < 40:
result += 40
else:
result += i
result = int(result / 5)
print("#%d %s" % (tc, result))
728x90
'๐งฉ Algorithm > SWEA' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
| [SWEA] 1225. [S/W ๋ฌธ์ ํด๊ฒฐ ๊ธฐ๋ณธ] 7์ผ์ฐจ - ์ํธ์์ฑ๊ธฐ (Python/D3) (0) | 2024.10.21 |
|---|---|
| [SWEA] 1220. [S/W ๋ฌธ์ ํด๊ฒฐ ๊ธฐ๋ณธ] 5์ผ์ฐจ - Magnetic (Python/D3) (0) | 2024.10.21 |
| [SWEA] 5601. [Professional] ์ฅฌ์ค ๋๋๊ธฐ (Python/D3) (1) | 2024.10.21 |
| [SWEA] 13229. ์ผ์์ผ (Python/D3) (0) | 2024.10.21 |
| [SWEA] 1289. ์์ฌ์ ๋ฉ๋ชจ๋ฆฌ ๋ณต๊ตฌํ๊ธฐ (Python/D3) (0) | 2024.10.20 |