File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55### 성능 요약
66
7- 메모리: 14220 KB, 시간: 104 ms
7+ 메모리: 14160 KB, 시간: 84 ms
88
99### 분류
1010
1111구현, 브루트포스 알고리즘, 누적 합
1212
1313### 제출 일자
1414
15- 2026년 2월 2일 21:31:45
15+ 2026년 2월 4일 23:41:49
1616
1717### 문제 설명
1818
Original file line number Diff line number Diff line change 11import java .io .BufferedReader ;
2- import java .io .FileInputStream ;
2+ // import java.io.FileInputStream;
33import java .io .InputStreamReader ;
44import java .util .*;
55
@@ -14,13 +14,14 @@ public static void main(String[] args) throws Exception {
1414
1515 for (int i = 0 ; i < 10 ; i ++) {
1616 sum += Integer .parseInt (br .readLine ());
17- if (Math .abs (100 - sum ) < Math .abs (100 - answer ) ||
18- (Math .abs (100 - sum ) == Math .abs (100 - answer ) && sum >= 100 )) {
17+ if (Math .abs (100 - sum ) < Math .abs (100 - answer ) || (sum >= 100 && Math .abs (100 - sum ) == Math .abs (100 - answer ))) {
1918 answer = sum ;
2019 }
21- }
2220
21+ }
2322 System .out .println (answer );
23+
24+
2425 }
2526
2627
You can’t perform that action at this time.
0 commit comments