Goods on the conveyor (retired)
Description:
At the enterprise, boxes with goods move along the conveyor, each box indicates the amount of goods inside, and also on the conveyor belt among the boxes with goods there are crumpled boxes with defective goods.
Task:
You need to count the number of goods in all the unrumpled boxes on the conveyor and determine the number of boxes with defects.
Input:
A string with numbers and star symbols, in which each number represents the quantity of goods in an unrumpled box, and each star represents a box with a defect.
Output:
A list where the first element is the number of goods in unrumpled boxes on the conveyor and the second element is the number of defective boxes.
Example:
"893" ---> [20, 2]
"1123981*7" ---> [32, 5]
"123" ---> [6, 0]
Notes:
- Each unrumpled box contains 1 to 9 goods.
- There are cases when there are no boxes with a defect on the conveyor, then the number of such boxes is 0.
Similar Kata:
Stats:
Created | Aug 14, 2023 |
Warriors Trained | 11 |
Total Skips | 0 |
Total Code Submissions | 15 |
Total Times Completed | 11 |
Python Completions | 11 |
Total Stars | 1 |
% of votes with a positive feedback rating | 25% of 6 |
Total "Very Satisfied" Votes | 0 |
Total "Somewhat Satisfied" Votes | 3 |
Total "Not Satisfied" Votes | 3 |
Total Rank Assessments | 7 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 7 kyu |