Skip to content

Commit 240376e

Browse files
committed
25707 팔찌 만들기
1 parent bbc6349 commit 240376e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/greedy/silver/silver_5/_25707.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import java.util.StringTokenizer;
55

66
public class _25707 {
7+
78
public static void main(String[] args) throws IOException {
89
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
910
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
@@ -15,16 +16,15 @@ public static void main(String[] args) throws IOException {
1516
int max = Integer.MIN_VALUE;
1617

1718
st = new StringTokenizer(br.readLine());
18-
1919
for (int i = 0; i < n; i++) {
2020
int bead = Integer.parseInt(st.nextToken());
21-
2221
min = Math.min(min, bead);
2322
max = Math.max(max, bead);
2423
}
2524

26-
bw.write(String.valueOf(2 * (max - min)));
25+
bw.write(String.valueOf((max - min) * 2));
2726
bw.flush();
2827
bw.close();
2928
}
29+
3030
}

0 commit comments

Comments
 (0)