Skip to content

Commit 9ec667f

Browse files
4~6章の練習問題の形式を1~3章とそろえる / 8章の練習問題のtypoを修正する (#42)
* 見出しの形式をそろえる * 練習問題の見出しに番号を振る * 4章の練習問題のitemsを追加 * 練習問題の見出しに番号を振る (chapter-5) * 5章の練習問題のitemsを追加 * 練習問題の見出しに番号を振る (chapter-6) * 6章の練習問題のitemsを追加 * typo * Update config.ts --------- Co-authored-by: Ryugo Takemura <18237819+Takeno-hito@users.noreply.github.com>
1 parent 4ef1fda commit 9ec667f

File tree

12 files changed

+55
-22
lines changed

12 files changed

+55
-22
lines changed

docs/.vitepress/config.ts

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,17 @@ export default withMermaid({
117117
{ text: '配列', link: '/text/chapter-4/array' },
118118
{ text: '文字列 ②', link: '/text/chapter-4/string' },
119119
{ text: 'for ②', link: '/text/chapter-4/for-advanced' },
120-
{ text: '練習問題', link: '/text/chapter-4/practice/' },
120+
{
121+
text: '練習問題',
122+
link: '/text/chapter-4/practice/' ,
123+
collapsed: true,
124+
items: [
125+
{ text: '4-A1. Fibonatti', link: '/text/chapter-4/practice/fibonatti' },
126+
{ text: '4-A2. DO NOT FAIL', link: '/text/chapter-4/practice/do-not-fail' },
127+
{ text: '4-A3. lower or UPPER', link: '/text/chapter-4/practice/lower-or-upper' },
128+
{ text: '4-B1. Fizz-Buzz 2D', link: '/text/chapter-4/practice/fizz-buzz-2d' },
129+
]
130+
},
121131
]
122132
},
123133
{
@@ -128,16 +138,31 @@ export default withMermaid({
128138
{ text: '引数', link: '/text/chapter-5/argument' },
129139
{ text: '返り値', link: '/text/chapter-5/return-value' },
130140
{ text: '参照渡し', link: '/text/chapter-5/call-by-ref' },
131-
{text: '練習問題', link: '/text/chapter-5/practice/'}
141+
{
142+
text: '練習問題',
143+
link: '/text/chapter-5/practice/',
144+
collapsed: true,
145+
items: [
146+
{ text: '5-A1. Divide each difficulty', link: '/text/chapter-5/practice/divide-each-difficulty' },
147+
{ text: '5-A2. Operator+=', link: '/text/chapter-5/practice/plus-equal' },
148+
]
149+
}
132150
]
133151
},
134152
{
135153
text: 'VI. コードの簡易化② - Struct',
136154
link: '/text/chapter-6/',
137155
items: [
138-
{text: '構造体', link: '/text/chapter-6/struct'},
139-
{text: 'メソッド', link: '/text/chapter-6/method'},
140-
{text: '練習問題', link: '/text/chapter-6/practice/'},
156+
{ text: '構造体', link: '/text/chapter-6/struct' },
157+
{ text: 'メソッド', link: '/text/chapter-6/method' },
158+
{
159+
text: '練習問題',
160+
link: '/text/chapter-6/practice/',
161+
collapsed: true,
162+
items: [
163+
{ text: '6-A1. Order', link: '/text/chapter-6/practice/order' },
164+
]
165+
},
141166
]
142167
},
143168
{ text: 'VII. おわりに・おまけ', link: '/text/chapter-7/' },
@@ -149,7 +174,15 @@ export default withMermaid({
149174
{ text: '再帰関数', link: '/text/chapter-8/recursive-function' },
150175
{ text: '実行時間', link: '/text/chapter-8/exec-time' },
151176
{ text: 'カプセル化', link: '/text/chapter-8/capsule' },
152-
{ text: '練習問題', link: '/text/chapter-8/practice/' },
177+
{
178+
text: '練習問題',
179+
link: '/text/chapter-8/practice/',
180+
collapsed: true,
181+
items: [
182+
{ text: 'Capsulated Zer0-Star', link: '/text/chapter-8/practice/capsulate-user' },
183+
{ text: 'Exponentation', link: '/text/chapter-8/practice/exponentation' },
184+
],
185+
},
153186
],
154187
},
155188
{

docs/text/chapter-4/practice/do-not-fail.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# DO NOT FAIL
1+
# 4-A2. DO NOT FAIL
22

33
入力された複数の点数を受け取って、59点以下なら`Failed`と出力しよう。また、`-1`が入力されたら`Passed!`と出力して終了しよう。
44

docs/text/chapter-4/practice/fibonatti.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 4-xx. Fibonatti Number
1+
# 4-A1. Fibonatti Number
22

33
正の整数$N$を受け取り、フィボナッチ数列の$N$番目を出力しよう。
44

docs/text/chapter-4/practice/fizz-buzz-2d.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# fizz-buzz 2D
1+
# 4-B1. fizz-buzz 2D
22

33
整数 $H, W$ が渡されるので、$H\times W$ の二次元配列 $a_{i,j}\ (1\leq i\leq H, 1\leq j\leq W)$ を出力しよう。
44

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# 練習問題 chapter-4
1+
# 練習問題 - Chapter 4
22

33
## 練習問題A
44

5-
- [Fibonatti](fibonatti)
6-
- [DO NOT FAIL](do-not-fail)
7-
- [lower or Upper](lower-or-upper)
5+
- [4-A1. Fibonatti](fibonatti)
6+
- [4-A2. DO NOT FAIL](do-not-fail)
7+
- [4-A3. lower or UPPER](lower-or-upper)
88

99
## 練習問題B
1010

11-
- [Fizz-Buzz 2D](fizz-buzz-2d)
11+
- [4-B1. Fizz-Buzz 2D](fizz-buzz-2d)

docs/text/chapter-4/practice/lower-or-upper.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# lower or UPPER
1+
# 4-A3. lower or UPPER
22

33
アルファベット1文字が渡されたとき、それが大文字なら"UPPERCASE"、小文字なら"lowercase"と出力しよう。
44

docs/text/chapter-5/practice/divide-each-difficulty.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Divide each difficulty
1+
# 5-A1. Divide each difficulty
22

33
以下の$n \leq 7$を受け取って$n \times n$の行列$a_{i,j}=Fibonatti_{ij}$を出力するプログラムの、フィボナッチ数列の解を求める部分を別の関数`int fibonatti(int index);`に分離してみよう。
44

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# 練習問題 - Chapter 5
22

3-
- [Divide each difficulty](divide-each-difficulty)
4-
- [Operator+=](plus-equal)
3+
- [5-A1. Divide each difficulty](divide-each-difficulty)
4+
- [5-A2. Operator+=](plus-equal)

docs/text/chapter-5/practice/plus-equal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Operator+=
1+
# 5-A2. Operator+=
22

33
`int`型の`a``b`について`a``b`を足す操作である
44

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# 練習問題 - Chapter 6
22

3-
- [Order](./order)
3+
- [6-A1. Order](./order)

0 commit comments

Comments
 (0)