回答編集履歴
2
追記
test
CHANGED
@@ -7,3 +7,14 @@
|
|
7
7
|
}
|
8
8
|
}
|
9
9
|
```
|
10
|
+
**追記**
|
11
|
+
曜日の間にスペースを入れたいのなら、
|
12
|
+
```Java
|
13
|
+
class Sample {
|
14
|
+
public static void main(String[] args) {
|
15
|
+
int n = Integer.parseInt(args[0]) * 2;
|
16
|
+
String week = "日 月 火 水 木 金 土 日 月 火 水 木 金";
|
17
|
+
System.out.println(week.substring(n, n+13));
|
18
|
+
}
|
19
|
+
}
|
20
|
+
```
|
1
コードの修正
test
CHANGED
@@ -3,8 +3,7 @@
|
|
3
3
|
class sample {
|
4
4
|
public static void main(String[] args) {
|
5
5
|
int n = Integer.parseInt(args[0]);
|
6
|
-
String week = "日月火水木金土日月火水木金";
|
7
|
-
System.out.println(
|
6
|
+
System.out.println("日月火水木金土日月火水木金".substring(n, n+7));
|
8
7
|
}
|
9
8
|
}
|
10
9
|
```
|