## <font color=" #7B7B7B">操作教學</font> ###### <font color="#7B7B7B">空白鍵:下一頁</font> ###### <font color="#7B7B7B">方向鍵:往該方向一頁</font> ###### <font color="#7B7B7B">ESC鍵:簡報全預覽</font> ###### <font color="#7B7B7B">右下方藍色箭頭:往該方向一頁</font> ###### <font color="#7B7B7B">若使用手機介面可直接上下左右滑動頁面,</font> ###### <font color="#7B7B7B">或是利用右下方藍色箭頭往該方向一頁</font> ###### <font color="#AE0000">建議使用電腦瀏覽,以獲得最佳觀賞品質</font> --- ## LMSH程式設計研究社 ### 12/22練習賽--高一組 --- ## 目次 * [觀念題](#/3/0) * [亞式數學](#/4/0) * [巧可老師的智力測驗](#/5/0) * [Roseliaのコンサート](#/6/0) * [推薦好物](#/7/0) --- ## 觀念題 高一組 ---- ![](https://i.imgur.com/8mg2aA7.png) 正解:C ###### b與c先相乘,在加上a,最後減e ###### 算術運算順序:先括號,再乘除,後加減,由左至右算一遍 ---- ![](https://i.imgur.com/615VwN8.png) 正解:A :::warning <font color="#0072E3">b</font>/<font color=" #0072E3">a</font>=1 (c++ 使用"/"時,僅保留商數,餘數自動捨去) ...依此類推 ::: b/a+c/b+d/b=3/2+4/3+5/3=1+1+1=3 ---- ![](https://i.imgur.com/EwGNwTf.png) 正解:C ```cpp while(a<10) a=a+5;(本區段執行完後,a必≥10) if(a<12) a=a+2;(本區段執行完後,a必≥12) if(a≤11) a=5;(於上區段執行後,a必≥12,故不可能≤11,所以a=5不會被執行) ``` ---- ![](https://i.imgur.com/mE0obGt.png) 正解:A ###### 若看不懂題目,可從下方引導試試 ```cpp= (turn)||(turn)==(turn) (turn)||(fales)==(turn) (turn)&&(fales)==(turn) (turn)&&(fales)==(turn) !(turn)==(fales) !(fales)==(turn) ``` ---- ![](https://i.imgur.com/yOTfdyy.png) 正解:B ``` G(3,7)意指 a=3,x=7 ......本題難度較高,詳細解法請待社長撰寫 (絕對不是社長想睡覺...) ``` ---- ![](https://i.imgur.com/7FucmaA.png) 正解:A ``` f(4)意指 n=4 並由輸出2468得知,第一次輸出之值為2,第二次輸出之值為4, 第三次輸出之值為6,第四次輸出之值為8,由此可推出三段空白程式碼 ``` --- ## 亞 式 數 學 高一組 ---- [題目傳送門](https://github.com/lmshlmcps4th/Bulletin-Board/releases/download/LMSH12.22/fPA.pdf) ---- ## 解題小提醒 #### 本題資料範圍 :::success $$ -2^{63}≤ X,Y,Z ≤2^{63}-1 $$ ::: | 變數類型 | 範圍 | | -------- | -------- | |int |-2^31^~2^31^-1| |long long |-2^63^~2^63^-1| ---- ## 想看解答了阿!! ## 在想一下嘛 ###### 解答下頁(C++) ---- ```CPP= #include <iostream> using namespace std; int main(){ int n; long long x,y,z;//注意資料範圍 for(cin>>n;n>0;n--){ //重複執行n次大括號中程式 cin>>x>>y>>z; if(x*y==z) cout<<"true\n"; else cout<<"false "<<x*y<<"\n"; } return 0; } ``` --- ## 巧可老師的智力測驗 高一組 ---- [題目傳送門](https://github.com/lmshlmcps4th/Bulletin-Board/releases/download/LMSH12.22/fPB.pdf) ---- ## 解題小提醒 ###### 每測資內不一定只有 1 筆測資(N≥1) ---- ## 想看解答了阿!! ## 在想一下嘛 ###### 解答下頁(C++) ---- ```CPP= #include <iostream> using namespace std; int main(){ int n,k1,k2,m; //k1、k2作為每行輸入之兩答案,m值作為統計分數用 for(cin>>n;n>0;n--){ cin>>k1>>k2; if(k1==k2) m=m+2; else m--; } cout<<m<<"夸"; return 0; } ``` --- ## Roseliaのコンサート 高一組 ---- [題目傳送門](https://github.com/lmshlmcps4th/Bulletin-Board/releases/download/LMSH12.22/fPC.pdf) ---- ## 解題小提醒 提示1. ``` 將輸入的第一個數字,轉為ASCII中代表的字母 65在ASCII中代表的字母為"A" 66在ASCII中代表的字母為"B" 依此類推... ``` 提示2. ###### 記得喔!從該排第一個位置開始坐 ###### 那種共會有幾排呢?? ---- ## 想看解答了阿!! ## 在想一下嘛 ###### 解答下頁(C++) ---- ```CPP= #include <iostream> using namespace std; int main(){ int a,b; cin>>a>>b; a=a+b/20+64; /*利用ASCII特性將輸入的第一數轉為對應的英文字母(大寫)ASCII碼 並檢查輸入的第二數是否大於20,是否可能造成該排溢位*/ if(b%20==0) /*考慮須將每排第0座位轉換為前排第20個座位 例:(N 0)-->(M 20)*/ cout<<(char)(a-1)<<" 20"; else cout<<(char)a<<" "<<b%20; //(char)a -->此為強制轉型(可參考ASCII) return 0; } ``` --- ## 推薦好物 ##### 不妨進來參觀一下吧!! ---- ### 練習程式的好地方 [zerojudge](https://zerojudge.tw/) [TNFSH Online Judge](https://toj.tfcis.org/oj/) [程式自學平台](https://e-tutor.itsa.org.tw/e-Tutor/Question_bank.php?id=37) [TIOJ](https://tioj.ck.tp.edu.tw/) [18DICE](http://dice.lmsh.tn.edu.tw/diceweb/dindex.html) ---- #### 若你英文不錯也可以試試這些 [Kattis](https://open.kattis.com/login) [UVa](https://onlinejudge.org/index.php?option=com_comprofiler&task=registers) [AtCoder](https://atcoder.jp/) ---- ### 學習的好地方 [SCIST](https://www.youtube.com/channel/UC5lWl8evP-TYy9cldZs8zwA) [資訊之芽](https://www.youtube.com/channel/UCUgrud9PMAFOVbKnUZyFcaQ) ---- ### 好用的程式編譯器 * [Dev-C++](https://sourceforge.net/projects/orwelldevcpp/) * [Code Blocks](https://www.codeblocks.org/) * [Visual Studio Code](https://visualstudio.microsoft.com/zh-hant/downloads/) * [replit(線上編譯器)](https://replit.com/) 有了編譯器,除了程式可以寫更快 更能快速找出程式的bug喔!! --- ## 詳細資訊 ---- [黎明高中資訊社資源庫(目錄)](https://hackmd.io/@Lmcps/B11Mud2LI) [社團官網](https://sites.google.com/view/lmcps/%E9%A6%96%E9%A0%81) [112th社團IG](https://www.instagram.com/lmshlmcps4th/) ---- 若對以上所有解答與資訊有問題 請洽: * mail: lmshlmcps4th@gmail.com * [112th社團IG](https://www.instagram.com/lmshlmcps4th/) --- ## 感謝蒞臨 #### 期待下學期社課與你相見
{"metaMigratedAt":"2023-06-16T16:48:03.898Z","metaMigratedFrom":"YAML","title":"110上學期Lmcps社內練習賽","breaks":true,"disqus":"hackmd","slideOptions":"{\"theme\":\"black\",\"transition\":\"slide\"}","contributors":"[{\"id\":\"b640162e-f48e-4ad5-8329-fbb881223dcc\",\"add\":5202,\"del\":613}]"}
    437 views
   Owned this note