웰컴 키트 - 30802번 문제

2025. 2. 17. 15:41백준

https://www.acmicpc.net/problem/30802

문제를 읽고 이해하는데 너무 오래 걸리는 거 같아요 ㅠ

 

 

import sys
import math
input = sys.stdin.readline

N = int(input())

data = list(map(int,(input().strip().split())))

T, P = map(int,(input().split()))
cnt = 0

for i in range(len(data)):
  if data[i] != 0:
    cnt += math.ceil(data[i]/T)
  else:
    continue
print(cnt)

R_result = math.floor(N/P)
print(R_result,N-(P*R_result))

 

3 / 5 1 / 5  4 / 5 1 / 5  5 / 5 9 / 5
티 묶음 1개 필요 티 묶음 1개 필요 티 묶음 1개 필요 티 묶음 1개 필요 티 묶음 1개 필요 티 묶음 2개 필요

 

 

'백준' 카테고리의 다른 글

분해합 2231번 문제  (0) 2025.02.17
소수 찾기 1978번 문제  (0) 2025.02.17
팰린드롬수 - 1259번 문제  (0) 2025.02.17
25314문제 코딩은 체육과목 입니다.  (0) 2024.03.18
10817문제 세 수  (0) 2024.03.16