# Zerojudge 題單
### 校內技藝競賽公告頁
https://hackmd.io/@didth14/B1vKU-oQc
#### 術科練習題 二級分難度
| 題目題數 | 題目編號 | 題目標題 | 題目連結 | PDF試題連結 |
|:--------:|:--------:|:----------------------:| ----------------------------------------------- | -------------------------------------------------------------------------------------------- |
| 1 | e835 | 表演座位(Seat) | https://zerojudge.tw/ShowProblem?problemid=e835 | https://toi-reg.csie.ntnu.edu.tw/wp-content/uploads/question/201908-onsite/2-Seats.pdf |
| 2 | f070 | 韓信點兵 | https://zerojudge.tw/ShowProblem?problemid=f070 | https://toi-reg.csie.ntnu.edu.tw/wp-content/uploads/question/202005/HanXin.pdf |
| 3 | g796 | 檔案分類(Files) | https://zerojudge.tw/ShowProblem?problemid=g796 | https://toi-reg.csie.ntnu.edu.tw//wp-content/uploads/question/202111/Files.pdf |
| 4 | g797 | 洗牌(Cards) | https://zerojudge.tw/ShowProblem?problemid=g797 | https://toi-reg.csie.ntnu.edu.tw//wp-content/uploads/question/202111/Cards.pdf |
| 5 | h033 | 雜訊移除(Noise) | https://zerojudge.tw/ShowProblem?problemid=h033 | https://toi-reg.csie.ntnu.edu.tw//wp-content/uploads/question/202112/Noise.pdf |
| 6 | h034 | 宴會(Banquet) | https://zerojudge.tw/ShowProblem?problemid=h034 | https://toi-reg.csie.ntnu.edu.tw//wp-content/uploads/question/202112/Banquet.pdf |
| 7 | h658 | 捕魚(Fishing) | https://zerojudge.tw/ShowProblem?problemid=h658 | https://drive.google.com/file/d/1dL-LjZzQ4C5FmwldhKJTiF_RCwV17WO_/view |
| 8 | h659 | 計程車(Taxi) | https://zerojudge.tw/ShowProblem?problemid=h659 | https://drive.google.com/file/d/1dJqodyWsiMvcfK3yPDk7vQu5JpG-tosK/view |
| 9 | e621 | 免費停車(Free Parking) | https://zerojudge.tw/ShowProblem?problemid=e621 | |
| 10 | e623 | PPAP | https://zerojudge.tw/ShowProblem?problemid=e623 | |
| 11 | e794 | 黃金比例 | https://zerojudge.tw/ShowProblem?problemid=e794 | https://toi-reg.csie.ntnu.edu.tw/wp-content/uploads/question/201912-onsite/1-GoldenRatio.pdf |
| 12 | e795 | 質數日 | https://zerojudge.tw/ShowProblem?problemid=e795 | https://toi-reg.csie.ntnu.edu.tw/wp-content/uploads/question/201912-onsite/2-PrimeDay.pdf |
| 13 | e807 | 降雨量統計 (Rainfall statistics) | https://zerojudge.tw/ShowProblem?problemid=e807 | https://toi-reg.csie.ntnu.edu.tw/wp-content/uploads/question/201911/B2-Rainfall.pdf |
##### Zj第三周第二 4/15~4/17
- [ ] 完成
| 題目題數 | 題目編號 | 題目標題 | 題目連結 | 難易度 |
|:--------:|:--------:|:-------------------:| ----------------------------------------------- |:------:|
| 1 | d126 | 牧場圍欄 | https://zerojudge.tw/ShowProblem?problemid=d126 | ★ |
| 2 | f925 | Is CIA Today? | https://zerojudge.tw/ShowProblem?problemid=f925 | ★ |
| 3 | d046 | 文文採西瓜 | https://zerojudge.tw/ShowProblem?problemid=d046 | ★ |
| 4 | e505 | 12602 - Nice Licence Plates | https://zerojudge.tw/ShowProblem?problemid=e505 | ★★ |
| 5 | c295 | 最大和 | https://zerojudge.tw/ShowProblem?problemid=c295 | ★★ |
| 6 | a015 | 矩陣的翻轉 | https://zerojudge.tw/ShowProblem?problemid=a015 | ★★ |
#### 第三周part 2 答案:
於4/17公布
#### Zj第三周第一 4/10~4/14
- [ ] 完成
| 題目題數 | 題目編號 | 題目標題 | 題目連結 | 難易度 |
|:--------:|:--------:|:-------------------:| ----------------------------------------------- |:------:|
| 1 | a005 | Eva的回家作業 | https://zerojudge.tw/ShowProblem?problemid=a005 | ★ |
| 2 | d491 | 我也愛偶數(swap版) | https://zerojudge.tw/ShowProblem?problemid=d491 | ★ |
| 3 | d010 | 盈數、虧數和完全數 | https://zerojudge.tw/ShowProblem?problemid=d010 | ★ |
| 4 | a147 | Print it all | https://zerojudge.tw/ShowProblem?problemid=a147 | ★★ |
| 5 | g275 | 七言對聯 | https://zerojudge.tw/ShowProblem?problemid=g275 | ★★ |
| 6 | a009 | 解碼器 | https://zerojudge.tw/ShowProblem?problemid=a009 | ★★ |
| 7 | b971 | 等差數列 | https://zerojudge.tw/ShowProblem?problemid=b971 | ★ |
| 8 | f442 | 老鷹抓小雞 Eagle | https://zerojudge.tw/ShowProblem?problemid=d442 | ★★★ |
#### 第三周 part1 答案:
於4/15公布
#### Zj第二周 4/3~4/9
| 題目題數 | 題目編號 | 題目標題 | 題目連結 | 難易度 |
|:--------:|:--------:|:-------------------:| ----------------------------------------------- |:------:|
| 1 | d063 | 0與1 | https://zerojudge.tw/ShowProblem?problemid=d063 | ★ |
| 2 | b969 | hello everyone | https://zerojudge.tw/ShowProblem?problemid=b969 | ★ |
| 3 | d051 | 糟糕,我發燒了! | https://zerojudge.tw/ShowProblem?problemid=d051 | ★ |
| 4 | b294 | 經濟大恐荒 | https://zerojudge.tw/ShowProblem?problemid=b2945 | ★★ |
| 5 | d066 | 上學去吧! | https://zerojudge.tw/ShowProblem?problemid=d066 | ★★ |
| 6 | d786 | 平均值 | https://zerojudge.tw/ShowProblem?problemid=d786 | ★★ |
| 7 | d074 | 電腦教室 | https://zerojudge.tw/ShowProblem?problemid=d074 | ★ |
| 8 | a216 | 數數愛明明 | https://zerojudge.tw/ShowProblem?problemid=a216 | ★★★ |
#### 第二周答案:
第一題 0與1
```python=1
a=int(input())
if a==0:
print(1)
else:
print(0)
```
第二題 hello everyone
```python=1
a=input().split()
c=input()
for i in a:
print("%s, %s"%(c,i))
```
第三題 糟糕,我發燒了!
```python=1
a=eval(input())
print("%.3f"%((a-32)*5/9))
```
第四題 經濟大恐慌
```python=1
n=int(input())
s=0
list1=[int(i) for i in input().split()]
for i in range(1,n+1):
s+=list1[i-1]*i
print(s)
```
第五題 上學去吧
```python=1
a,b=map(int,input().split())
c=a*60+b
if c>=450 and c<1020:
print("At School")
else:
print("Off School")
```
第六題 平均值
```python=1
a=int(input())
for i in range(a):
list1=[int(i) for i in input().split()]
c=sum(list1[1:])/(len(list1)-1)
print("%.2f"%(round(c,2)))
```
第七題 電腦教室
```python=1
a=int(input())
list1=[int(i) for i in input().split()]
print(max(list1))
```
第八題 數數愛明明
```python=1
while True:
try:
n = int(input()) # 將輸入的文字轉換成數字
f = 0 # 新增變數 f 預設 0
g = 0 # 新增變數 g 預設 0
for i in range(1,n+1): # 依序取出 1~n 的數字
f = f + i # 計算 f(n) = n + f(n-1)
g = g + f # 計算 g(n) = f(n) + g(n-1)
print(f, g) # 輸出 f 和 g
except:
break
```
#### Zj第一周 3/28~4/2
| 題目題數 | 題目編號 | 題目標題 | 題目連結 | 難易度 |
|:--------:|:--------:|:-------------------:| ----------------------------------------------- |:------:|
| 1 | a001 | 哈囉 | https://zerojudge.tw/ShowProblem?problemid=a001 | ★ |
| 2 | c379 | 成為出題者 | https://zerojudge.tw/ShowProblem?problemid=c379 | ★ |
| 3 | c929 | 蝸牛老師的點名單-續 | https://zerojudge.tw/ShowProblem?problemid=c929 | ★ |
| 4 | a065 | 提款卡密碼 | https://zerojudge.tw/ShowProblem?problemid=a065 | ★★ |
| 5 | a053 | Sagit's 計分程式 | https://zerojudge.tw/ShowProblem?problemid=a053 | ★ |
| 6 | f441 | 評分系統 Score | https://zerojudge.tw/ShowProblem?problemid=f441 | ★★★ |
| 7 | e051 | 文意字彙 | https://zerojudge.tw/ShowProblem?problemid=e051 | ★★ |
| 8 | a004 | 文文的求婚 | https://zerojudge.tw/ShowProblem?problemid=a004 | ★ |
第一周提示:
a065 提款機密碼
利用ord(計算ASCII)的函式,去計算前一個跟後一個差多少的ord就可以了
f441 評分系統Score
list1為答案,再去判斷下面的list一個一個有沒有與答案一樣,有的話就加分
#### 第一周答案:
第一題 a001哈囉
```python=1
a=input()
print("hello,",a)
```
第二題 c379成為出題者
```python=1
a=int(input())
print("%d"%(a*0.3))
```
第三題 c929 蝸牛老師的點名單-續
```python=1
a=input()
b=input().split(a)
for i in b:
print(i)
```
第四題 a065 提款機密碼
```python=1
a=input()
list1=[]
for i in range(1,len(a)):
list1.append(abs(ord(a[i])-ord(a[i-1])))
for i in list1:
print(i,end="")
```
第五題 a056 Sagit's計分程式
```python=1
n=int(input())
if n<=10:
print(n*6)
elif n<=20:
print(60+(n-10)*2)
elif n<=40:
print(80+(n-20)*1)
else:
print(100)
```
第六題 評分系統 Score
```python=1
n,s=map(int,input().split())
list1=[int(i) for i in input().split()]
w=int(input())
for i in range(w):
a=0
list2=[int(i) for i in input().split()]
for j in range(n):
if list1[j]==list2[j]:
a+=s
print(a)
```
第七題 文意字彙
```python=1
a=input()
list1=list(a)
for i in range(1,len(a)-1):
list1[i]="_"
for i in list1:
print(i,end="")
```
第八題 文文的求婚
```python=1
while 1:
try:
a=int(input())
if a%4==0 and a%100!=0 or a%400==0:
print("閏年")
else:
print("平年")
except:
break
```