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
- Kaggle
- Git
- Baekjoon
- 더현대서울 맛집
- 프로그래머스 파이썬
- ubuntu
- gs25
- SW Expert Academy
- 데이콘
- hackerrank
- 맥북
- 금융문자분석경진대회
- Docker
- 편스토랑 우승상품
- leetcode
- github
- dacon
- 프로그래머스
- 우분투
- AI 경진대회
- 캐치카페
- 파이썬
- PYTHON
- Real or Not? NLP with Disaster Tweets
- ChatGPT
- 코로나19
- 편스토랑
- programmers
- 자연어처리
- 백준
Archives
- Today
- Total
솜씨좋은장씨
[BaekJoon] 2845번 : 파티가 끝나고 난 뒤 (Python) 본문
728x90
반응형

코딩 1일 1문제! 오늘의 문제는 백준의 파티가 끝나고 난 뒤 입니다.
2845번: 파티가 끝나고 난 뒤
파티가 끝나고 나면, 사람들은 누가 파티에 왔는지와 얼마나 많은 사람들이 왔는지를 궁금해한다. 보통 파티는 매우 크게 열리기 때문에, 정확하게 몇 명이 참가했는지 알 수가 없다. 지난주 토
www.acmicpc.net
👨🏻💻 코드 ( Solution )
def cacluate_total_participant(L, P):
return L * P
def get_error_num(total_participant, article_num):
return article_num - total_participant
def after_finish_party(L, P, article_info):
answer = []
total_participant = cacluate_total_participant(L, P)
for article_num in article_info:
answer.append(str(get_error_num(total_participant, article_num)))
return " ".join(answer)
if __name__ == "__main__":
L, P = map(int, input().split())
article_info = list(map(int, input().split()))
print(after_finish_party(L, P, article_info))
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] 1015번 : 수열 정렬 (Python) (0) | 2022.04.23 |
---|---|
[BaekJoon] 2435번 : 기상청 인턴 신현수 (Python) (0) | 2022.04.22 |
[BaekJoon] 2460번 : 지능형 기차 2 (Python) (0) | 2022.04.20 |
[BaekJoon] 11948번 : 과목선택 (Python) (0) | 2022.04.19 |
[BaekJoon] 2748번 : 피보나치 수 2 (Python) (0) | 2022.04.18 |