JAVA_LeetCode 2383_Minimum Hours of Training to Win a Competition 풀이 class Solution { public int minNumberOfHours(int initialEnergy, int initialExperience, int[] energy, int[] experience) { // 모든 에너지에서 초기 에너지 + 1을 뺀다음, 경험치 필요 여부에 따라 계산한다. int res = 0, res2 = 0, num = 0, diff = 0; for(int i = 0; i < energy.length; i++) num += energy[i]; if(initialEnergy <= num) res = num - initialEnergy + 1; for(int i = 0; i < experience.length; i++){ if(initialExperience <= experience[i]) { diff = experience[i] ...
#
JAVA
#
JAVA_LeetCode2383
#
JAVA_LeetCode2383_MinimumHoursofTrainingtoWinaCompetition
#
JAVA_MinimumHoursofTrainingtoWinaCompetition
#
LeetCode2383_MinimumHoursofTrainingtoWinaCompetition