回答編集履歴
1
インデント修正
test
CHANGED
@@ -4,17 +4,17 @@
|
|
4
4
|
import java.util.*;
|
5
5
|
|
6
6
|
public class Main {
|
7
|
-
|
7
|
+
public static void main(String[] args) throws Exception {
|
8
|
-
|
8
|
+
Scanner sc = new Scanner(System.in);
|
9
|
-
|
9
|
+
String num = sc.nextLine();
|
10
10
|
|
11
|
-
|
11
|
+
int sum = 0;
|
12
|
-
|
12
|
+
for(String s : num.replace("-", "").split("")) {
|
13
|
-
|
13
|
+
int v = Integer.parseInt(s);
|
14
|
-
|
14
|
+
sum += v == 0 ? 12 : v+2;
|
15
|
-
|
15
|
+
}
|
16
16
|
|
17
|
-
|
17
|
+
System.out.println(sum * 2);
|
18
|
-
|
18
|
+
}
|
19
19
|
}
|
20
20
|
```
|