File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed
Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ # [ D1] 평균값 구하기 - 2071
2+
3+ [ 문제 링크] ( https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5QRnJqA5cDFAUq )
4+
5+ ### 성능 요약
6+
7+ 메모리: 25,344 KB, 시간: 75 ms, 코드길이: 750 Bytes
8+
9+ ### 제출 일자
10+
11+ 2025-09-25 17:44
12+
13+
14+
15+ > 출처: SW Expert Academy, https://swexpertacademy.com/main/code/problem/problemList.do
Original file line number Diff line number Diff line change 1+ import java .io .*;
2+ import java .util .*;
3+
4+ class Solution
5+ {
6+ public static void main (String args []) throws Exception
7+ {
8+ BufferedReader br = new BufferedReader (new InputStreamReader (System .in ));
9+ int T = Integer .parseInt (br .readLine ());
10+ StringBuilder sb = new StringBuilder ();
11+
12+ for (int i =1 ; i <=T ; i ++){
13+ int sum = 0 ;
14+ StringTokenizer st = new StringTokenizer (br .readLine ());
15+ for (int j =0 ; j <10 ; j ++){
16+ sum += Integer .parseInt (st .nextToken ());
17+ }
18+
19+ int avg =0 ;
20+
21+ if (sum %10 >= 5 ) avg = sum /10 + 1 ;
22+ else avg = sum /10 ;
23+ sb .append ("#" + i + " " + avg + "\n " );
24+ }
25+ System .out .println (sb );
26+ }
27+ }
You can’t perform that action at this time.
0 commit comments