-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
1,111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"timelimit": 1000, | ||
"memlimit": 524288, | ||
"compile": "g++", | ||
"score": "rate", | ||
"check": "diff", | ||
"test": [ | ||
{ | ||
"data": [ | ||
1 | ||
], | ||
"weight": 100 | ||
} | ||
], | ||
"metadata": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<style> | ||
.probcontent { | ||
white-space: pre-wrap; | ||
white-space: -moz-pre-wrap; | ||
white-space: -o-pre-wrap; | ||
word-wrap: break-word; | ||
} | ||
|
||
.mainp { | ||
text-indent: 2em; | ||
} | ||
|
||
.tableborder { | ||
border-collapse: collapse; | ||
width: auto; | ||
} | ||
|
||
.tableborder td { | ||
border: 1px solid #fcfaf2; | ||
padding: 0px 10px 0px 10px; | ||
} | ||
|
||
</style> | ||
<center> | ||
<h1>雙層迴圈 1</h1> | ||
第8屆國中生程設營 | ||
</center> | ||
<p class="mainp">請使用雙層for迴圈輸出5行,每行5個*。</p> | ||
|
||
<h3>輸入說明</h3> | ||
<p class="probcontent">本題沒有輸入。</p> | ||
|
||
<h3>輸出說明</h3> | ||
<p class="probcontent">按題目所述輸出。</p> | ||
|
||
<h3>範例</h3> | ||
<table class="tableborder"> | ||
<tr> | ||
<td>輸入</td> | ||
<td>輸出</td> | ||
</tr> | ||
<tr> | ||
<td valign="top"> | ||
<p class="probcontent"></p> | ||
</td> | ||
<td valign="top"> | ||
<p class="probcontent">***** | ||
***** | ||
***** | ||
***** | ||
***** | ||
|
||
</p> | ||
</td> | ||
</tr> | ||
</table> | ||
|
||
<h3>提示</h3> | ||
<p class="probcontent">完成本題你將會學到如何在for迴圈內放入另一個for迴圈,我們會稱這個為雙層迴圈或巢狀迴圈。</p> | ||
|
||
<h3>配分方法</h3> | ||
<table class="tableborder"> | ||
<tr> | ||
<td>100%</td> | ||
<td>範例測資</td> | ||
</tr> | ||
</table> | ||
|
||
<pre><footer> -xiplus, 2021.07.24</footer></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"timelimit": 1000, | ||
"memlimit": 524288, | ||
"compile": "g++", | ||
"score": "rate", | ||
"check": "diff", | ||
"test": [ | ||
{ | ||
"data": [ | ||
1 | ||
], | ||
"weight": 1 | ||
}, | ||
{ | ||
"data": [ | ||
2 | ||
], | ||
"weight": 49 | ||
}, | ||
{ | ||
"data": [ | ||
3 | ||
], | ||
"weight": 50 | ||
} | ||
], | ||
"metadata": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<style> | ||
.probcontent { | ||
white-space: pre-wrap; | ||
white-space: -moz-pre-wrap; | ||
white-space: -o-pre-wrap; | ||
word-wrap: break-word; | ||
} | ||
|
||
.mainp { | ||
text-indent: 2em; | ||
} | ||
|
||
.tableborder { | ||
border-collapse: collapse; | ||
width: auto; | ||
} | ||
|
||
.tableborder td { | ||
border: 1px solid #fcfaf2; | ||
padding: 0px 10px 0px 10px; | ||
} | ||
|
||
</style> | ||
<center> | ||
<h1>雙層迴圈 2</h1> | ||
第8屆國中生程設營 | ||
</center> | ||
<p class="mainp">給你一個整數$N$,請使用雙層for迴圈輸出$N$行,每行5個*。</p> | ||
<p class="mainp">保證$1 \leq N \leq 100$。</p> | ||
|
||
<h3>輸入說明</h3> | ||
<p class="probcontent">只有一個整數$N$。</p> | ||
|
||
<h3>輸出說明</h3> | ||
<p class="probcontent">按題目所述輸出。</p> | ||
|
||
<h3>範例</h3> | ||
<table class="tableborder"> | ||
<tr> | ||
<td>輸入</td> | ||
<td>輸出</td> | ||
</tr> | ||
<tr> | ||
<td valign="top"> | ||
<p class="probcontent">3</p> | ||
</td> | ||
<td valign="top"> | ||
<p class="probcontent">***** | ||
***** | ||
***** | ||
|
||
</p> | ||
</td> | ||
</tr> | ||
</table> | ||
|
||
<h3>提示</h3> | ||
<p class="probcontent">完成本題你將會學到如何用題目給你的數值來控制你外層迴圈的次數。</p> | ||
|
||
<h3>配分方法</h3> | ||
<table class="tableborder"> | ||
<tr> | ||
<td>1%</td> | ||
<td>範例測資</td> | ||
</tr> | ||
<tr> | ||
<td>99%</td> | ||
<td>無特別限制</td> | ||
</tr> | ||
</table> | ||
|
||
<pre><footer> -xiplus, 2021.07.24</footer></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"timelimit": 1000, | ||
"memlimit": 524288, | ||
"compile": "g++", | ||
"score": "rate", | ||
"check": "diff", | ||
"test": [ | ||
{ | ||
"data": [ | ||
1 | ||
], | ||
"weight": 1 | ||
}, | ||
{ | ||
"data": [ | ||
2 | ||
], | ||
"weight": 49 | ||
}, | ||
{ | ||
"data": [ | ||
3 | ||
], | ||
"weight": 50 | ||
} | ||
], | ||
"metadata": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<style> | ||
.probcontent { | ||
white-space: pre-wrap; | ||
white-space: -moz-pre-wrap; | ||
white-space: -o-pre-wrap; | ||
word-wrap: break-word; | ||
} | ||
|
||
.mainp { | ||
text-indent: 2em; | ||
} | ||
|
||
.tableborder { | ||
border-collapse: collapse; | ||
width: auto; | ||
} | ||
|
||
.tableborder td { | ||
border: 1px solid #fcfaf2; | ||
padding: 0px 10px 0px 10px; | ||
} | ||
|
||
</style> | ||
<center> | ||
<h1>雙層迴圈 3</h1> | ||
第8屆國中生程設營 | ||
</center> | ||
<p class="mainp">給你一個整數$N$,請使用雙層for迴圈輸出$N$行,每行先輸出輸出5個*,再輸出1個-,再輸出該行的編號(依序1 ~ $N$)。</p> | ||
<p class="mainp">保證$1 \leq N \leq 100$。</p> | ||
|
||
<h3>輸入說明</h3> | ||
<p class="probcontent">只有一個整數$N$。</p> | ||
|
||
<h3>輸出說明</h3> | ||
<p class="probcontent">按題目所述輸出。</p> | ||
|
||
<h3>範例</h3> | ||
<table class="tableborder"> | ||
<tr> | ||
<td>輸入</td> | ||
<td>輸出</td> | ||
</tr> | ||
<tr> | ||
<td valign="top"> | ||
<p class="probcontent">3</p> | ||
</td> | ||
<td valign="top"> | ||
<p class="probcontent">*****-1 | ||
*****-2 | ||
*****-3 | ||
|
||
</p> | ||
</td> | ||
</tr> | ||
</table> | ||
|
||
<h3>提示</h3> | ||
<p class="probcontent">完成本題你將會學到輸出每一行時,你的計數器分別是多少。</p> | ||
|
||
<h3>配分方法</h3> | ||
<table class="tableborder"> | ||
<tr> | ||
<td>1%</td> | ||
<td>範例測資</td> | ||
</tr> | ||
<tr> | ||
<td>99%</td> | ||
<td>無特別限制</td> | ||
</tr> | ||
</table> | ||
|
||
<pre><footer> -xiplus, 2021.07.24</footer></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"timelimit": 1000, | ||
"memlimit": 524288, | ||
"compile": "g++", | ||
"score": "rate", | ||
"check": "diff", | ||
"test": [ | ||
{ | ||
"data": [ | ||
1 | ||
], | ||
"weight": 1 | ||
}, | ||
{ | ||
"data": [ | ||
2 | ||
], | ||
"weight": 49 | ||
}, | ||
{ | ||
"data": [ | ||
3 | ||
], | ||
"weight": 50 | ||
} | ||
], | ||
"metadata": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<style> | ||
.probcontent { | ||
white-space: pre-wrap; | ||
white-space: -moz-pre-wrap; | ||
white-space: -o-pre-wrap; | ||
word-wrap: break-word; | ||
} | ||
|
||
.mainp { | ||
text-indent: 2em; | ||
} | ||
|
||
.tableborder { | ||
border-collapse: collapse; | ||
width: auto; | ||
} | ||
|
||
.tableborder td { | ||
border: 1px solid #fcfaf2; | ||
padding: 0px 10px 0px 10px; | ||
} | ||
|
||
</style> | ||
<center> | ||
<h1>雙層迴圈 4</h1> | ||
第8屆國中生程設營 | ||
</center> | ||
<p class="mainp">接續雙層迴圈 3,原本每行輸出5個*,請改成每行輸出的個數都跟行編號一樣。</p> | ||
<p class="mainp">題目敘述:給你一個整數$N$,請使用雙層for迴圈輸出$N$行,第幾行就輸出幾個*,再輸出1個-,再輸出該行的編號(依序1 ~ $N$)。</p> | ||
<p class="mainp">保證$1 \leq N \leq 100$。</p> | ||
|
||
<h3>輸入說明</h3> | ||
<p class="probcontent">只有一個整數$N$。</p> | ||
|
||
<h3>輸出說明</h3> | ||
<p class="probcontent">按題目所述輸出。</p> | ||
|
||
<h3>範例</h3> | ||
<table class="tableborder"> | ||
<tr> | ||
<td>輸入</td> | ||
<td>輸出</td> | ||
</tr> | ||
<tr> | ||
<td valign="top"> | ||
<p class="probcontent">5</p> | ||
</td> | ||
<td valign="top"> | ||
<p class="probcontent">*-1 | ||
**-2 | ||
***-3 | ||
****-4 | ||
*****-5 | ||
|
||
</p> | ||
</td> | ||
</tr> | ||
</table> | ||
|
||
<h3>提示</h3> | ||
<p class="probcontent">完成本題你將會學到在內層迴圈條件判斷中使用外層迴圈的計數器。</p> | ||
|
||
<h3>配分方法</h3> | ||
<table class="tableborder"> | ||
<tr> | ||
<td>1%</td> | ||
<td>範例測資</td> | ||
</tr> | ||
<tr> | ||
<td>99%</td> | ||
<td>無特別限制</td> | ||
</tr> | ||
</table> | ||
|
||
<pre><footer> -xiplus, 2021.07.24</footer></pre> |
Oops, something went wrong.