Retired

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:

  1. Each unrumpled box contains 1 to 9 goods.
  2. There are cases when there are no boxes with a defect on the conveyor, then the number of such boxes is 0.
Strings

Stats:

CreatedAug 14, 2023
Warriors Trained11
Total Skips0
Total Code Submissions15
Total Times Completed11
Python Completions11
Total Stars1
% of votes with a positive feedback rating25% of 6
Total "Very Satisfied" Votes0
Total "Somewhat Satisfied" Votes3
Total "Not Satisfied" Votes3
Total Rank Assessments7
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • Liza12 Avatar
Ad