출처

https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=3&contestProbId=AWdXofhKFkADFAWn&categoryId=AWdXofhKFkADFAWn&categoryType=CODE&problemTitle=&orderBy=PASS_RATE&selectCodeLang=PYTHON&select-1=3&pageSize=10&pageIndex=4

과정

  1. 평균 월급을 저장할 res를 0 으로 초기화 한다.
  2. n번에 걸쳐 res에 월급을 받을 확률 p 와 받을 수 있는 월급x를 곱해서 더해준다.
  3. 테스트 케이스 번호와 res를 소수점 아래 6자리까지 출력해준다.

정답 코드

태그: ,

카테고리:

업데이트: