Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- AI 경진대회
- PYTHON
- 데이콘
- ubuntu
- ChatGPT
- 편스토랑
- 편스토랑 우승상품
- leetcode
- Real or Not? NLP with Disaster Tweets
- Docker
- hackerrank
- 금융문자분석경진대회
- 프로그래머스 파이썬
- 더현대서울 맛집
- Kaggle
- Git
- 프로그래머스
- 캐치카페
- 맥북
- SW Expert Academy
- 우분투
- gs25
- 파이썬
- github
- programmers
- Baekjoon
- 백준
- 코로나19
- 자연어처리
- dacon
Archives
- Today
- Total
솜씨좋은장씨
[BaekJoon] 25858번 : Divide the Cash (Python) 본문
728x90
반응형

코딩 1일 1문제! 오늘의 문제는 백준의 Divide the Cash 입니다.
25858번: Divide the Cash
The UCF Programming Team coaches schedule practices regularly in fall and spring (by the way, all UCF students are welcome to the practices). During summer, the majority of the team members are gone but the coaches know how to make sure the students don’
www.acmicpc.net
👨🏻💻 코드 ( Solution )
def divide_the_cash(team_member_numbers, money):
total_team_num = sum(team_member_numbers)
money_for_each_member = money // total_team_num
return [member_num * money_for_each_member for member_num in team_member_numbers]
def print_answer(answer):
for ans in answer:
print(ans)
if __name__ == "__main__":
team_member_numbers = []
N, money = map(int, input().split())
for _ in range(N):
member_num = int(input())
team_member_numbers.append(member_num)
answer = divide_the_cash(
team_member_numbers=team_member_numbers, money=money
)
print_answer(answer=answer)
GitHub - SOMJANG/CODINGTEST_PRACTICE: 1일 1문제 since 2020.02.07
1일 1문제 since 2020.02.07. Contribute to SOMJANG/CODINGTEST_PRACTICE development by creating an account on GitHub.
github.com
'Programming > 코딩 1일 1문제' 카테고리의 다른 글
[BaekJoon] 24745번 : Morse Code Palindromes (Python) (0) | 2022.10.30 |
---|---|
[BaekJoon] 25893번 : Majestic 10 (Python) (0) | 2022.10.29 |
[BaekJoon] 6810번 : ISBN (Python) (0) | 2022.10.27 |
[Programmers] 숫자 짝궁 (Python) (0) | 2022.10.26 |
[Programmers] 가장 큰 수 찾기 (Python) (0) | 2022.10.25 |
Comments