← 返回 perplexity 的题目列表Implement ToDo list for AI
类型:online_judge
Implement a ToDo list application for AI with the following requirements:
Users can create, delete, update, and complete tasks.
Each task includes a title and an optional detailed description.
Provide functionality to view all incomplete and completed tasks.
The system should be able to mark and count completed and incomplete tasks.
Constraints: The number of tasks should not exceed 100.
Test Cases:
Case 1: Create 5 tasks, complete 2 of them, and verify the statistics.
Case 2: Update the description of a task.
Case 3: Delete a task and verify it no longer exists.
Case 4: Attempt to create 101 tasks and expect an error.
Case 5: View all incomplete and completed tasks lists.
Example
Input
create 5 tasks, complete 2, verify