public static void main(String[] args) { int count = 3; int[] scoreArray = {40, 80, 60}; int maxScore = 0; int totalScore = 0; for (int score : scoreArray) { if (score > maxScore) { maxScore = score; } totalScore += score; } int renewalScore = totalScore * 100 / maxScore / count; System.out.println(renewalScore); }