문제 풀이/Baekjoon Online Judge
[python3] 13458번 시험 감독
[잉간]
2018. 10. 15. 11:32
먼저 총감독관이 감시할 수 있는 응시자의 수를 뺀다. (cnt + 1)
그리고 (남은 응시생 / 부감독관이 감시할 수 있는 수)를 cnt에 더한다.
문제풀이
N = int(input()) A = list(map(int,input().split())) B = list(map(int,input().split())) cnt = 0 for i in range(0,N): A[i] = A[i] - B[0] if A[i] > 0: if A[i] % B[1] == 0: cnt += A[i] // B[1] else: cnt += (A[i] // B[1]) + 1 cnt += 1 print(cnt)