-
[java]백준 평균 점수 10039번알고리즘 문제풀이/백준(자바) 2023. 4. 25. 22:10
코드
import java.util.Scanner; public class BOJ_10039 { public static void main(String[] args) { Scanner in =new Scanner(System.in); int s=0;//총합 for (int i = 0; i < 5; i++) {//5는 학생수 int q =in.nextInt();//점수 if(q<40){//40미만이면 점수에 40할당 q=40; } s+=q; } System.out.println(s/5); in.close(); } }
링크
https://www.acmicpc.net/problem/10039
'알고리즘 문제풀이 > 백준(자바)' 카테고리의 다른 글
[java]백준 A+B 26711번 (0) 2023.04.27 [java]백준 접미사 배열 11656번 (0) 2023.04.26 [java]백준 설탕 배달 2839번 (0) 2023.04.24 [java]백준 돌 게임 2 9656번 (0) 2023.04.23 [java]백준 돌 게임 9655번 (0) 2023.04.23