NTHU EE2310(2025 年度)《由片語學習C程式設計(第二版)》課程的 C 語言參考解答,依照課本章節分類整理。
- 所有程式碼以簡單的 C 語言撰寫(不使用 C++ 語法)
- 每個檔案包含詳細的中英雙語註解(繁體中文 + English)
- 每題包含解題流程說明(中英文各自逐步說明)
- 每題說明參考課本章節,方便對應學習
- 每題附有原始題目連結(NTHU ACM Online Judge)
gcc -std=c99 -o out NNNNN.c -lm
部分題目需要 -lm 連結數學函式庫(如 sin、cos、sqrt)。
| 題號 |
題目 |
題目連結 |
| 14651 |
Compute rectangle perimeter and area |
🔗 |
| 14667 |
Rectangle area (2D) |
🔗 |
| 14668 |
Cuboid surface area and volume |
🔗 |
| 14685 |
Sum of digits of a four-digit number |
🔗 |
| 題號 |
題目 |
題目連結 |
| 14653 |
Maximum of three integers |
🔗 |
| 14682 |
Check if line passes through origin |
🔗 |
| 14683 |
Animals in a cage (chicken & rabbit) |
🔗 |
| 14684 |
Triangle inequality |
🔗 |
| 14686 |
Multiple determination |
🔗 |
| 14688 |
Triangle categories |
🔗 |
| 題號 |
題目 |
題目連結 |
| 14687 |
Sum of integers |
🔗 |
| 14699 |
Calculation of days from 1970-01-01 |
🔗 |
| 14700 |
Number base conversion (2/8/10) |
🔗 |
| 14706 |
Digit rotation |
🔗 |
| 14715 |
Prime factorization |
🔗 |
| 14743 |
Count coprime pairs |
🔗 |
| 14780 |
Uniform invoice prize calculation |
🔗 |
| 題號 |
題目 |
題目連結 |
| 14702 |
Print odd/even indexed values |
🔗 |
| 14703 |
Average score per student and course |
🔗 |
| 14711 |
3D Bingo Cube |
🔗 |
| 14713 |
Third closest point to origin (3D) |
🔗 |
| 14714 |
Tic-Tac-Toe |
🔗 |
| 14716 |
Odd and even separation |
🔗 |
| 14739 |
Mirror Room with −45° mirrors |
🔗 |
| 14740 |
Spiral traversal of matrix |
🔗 |
| 14757 |
Matrix maximum (4×4) |
🔗 |
| 14777 |
Graphic rotation |
🔗 |
| 14781 |
Word frequency count |
🔗 |
| 14791 |
Combination sum |
🔗 |
| 題號 |
題目 |
題目連結 |
| 14712 |
Cosine via Taylor series |
🔗 |
| 14742 |
Distance between two points (polar) |
🔗 |
| 14744 |
Roots of a quadratic equation |
🔗 |
| 題號 |
題目 |
題目連結 |
| 14708 |
Longest double palindrome |
🔗 |
| 14794 |
Evaluate function and find maximum |
🔗 |
| 題號 |
題目 |
題目連結 |
| 14755 |
Maximum value via pointer array |
🔗 |
| 14756 |
Upper-triangular linear system solver |
🔗 |
| 14758 |
Pointer add function |
🔗 |
| 題號 |
題目 |
題目連結 |
| 14778 |
English plural forms |
🔗 |
| 14779 |
Word similarity judgment |
🔗 |
| 14802 |
Add two large integers (string) |
🔗 |
| 14820 |
Database server (SQL-like queries) |
🔗 |
| 14875 |
Date format converter |
🔗 |
| 14877 |
Word sorting |
🔗 |
| 題號 |
題目 |
題目連結 |
| 14803 |
Subnet determination count |
🔗 |
| 14804 |
Simulated bookshelf management |
🔗 |
| 14819 |
Average grade (struct) |
🔗 |
| 14822 |
Tic-Tac-Toe winner (struct version) |
🔗 |
| 題號 |
題目 |
題目連結 |
| 14824 |
Map coloring (backtracking) |
🔗 |
| 14825 |
Longest common subsequence |
🔗 |
| 14829 |
Maximum profit from cutting a rectangle |
🔗 |
| 14830 |
Mahjong winning tiles |
🔗 |
| 14835 |
Friendship (binary file) |
🔗 |
| 14836 |
Reverse output of linked list |
🔗 |
| 14850 |
The Skyline Problem |
🔗 |
| 14866 |
Josephus problem |
🔗 |
| 14878 |
L-tromino tiling |
🔗 |
| 題號 |
題目 |
題目連結 |
| 14834 |
Binary file comparison |
🔗 |
| 14843 |
Text file comparison |
🔗 |
| 14844 |
File splitting |
🔗 |
| 題號 |
題目 |
題目連結 |
| 14823 |
Same direct supervisor |
🔗 |
| 14846 |
Event triggering logic inference |
🔗 |
| 14847 |
BST subtree size computation |
🔗 |
| 14849 |
Bookshelf management (linked list) |
🔗 |
| 14859 |
k-th smallest in BST |
🔗 |
| 14864 |
Map color (graph coloring) |
🔗 |
| 14865 |
Employee network |
🔗 |
| 14871 |
Queue operations |
🔗 |
| 14874 |
Build binary tree |
🔗 |
| 題號 |
題目 |
題目連結 |
| 14858 |
Expression calculator |
🔗 |
by EEccliTA, NTHU