Retired

Count bots (retired)

Description:

You receive capcha submissions from users (or bots?) and you need to count how many wrong aswers have been submitted (potential bots).

Each submission consists of catcha string and the answer. Captcha hides a simple mathematical expression with some addtional noise that can be any small or capital letter of the alphabet, examples: "AbC3rr-HH2jj", GGG9*5

For example, when the function countBots(submissions) is invoked with the following array of submissions:

[
  {
    captcha:"1+1", 
    answer: 2,
  },
  {
    captcha:"abc5*ab2a", 
    answer: 2,
  }
]

it should return 1, becasue one of the submissions has wrong answer (5x2=10 not 2)

Regular Expressions
Arrays

Stats:

CreatedApr 25, 2024
Warriors Trained16
Total Skips0
Total Code Submissions33
Total Times Completed10
JavaScript Completions10
Total Stars0
% of votes with a positive feedback rating50% of 7
Total "Very Satisfied" Votes2
Total "Somewhat Satisfied" Votes3
Total "Not Satisfied" Votes2
Total Rank Assessments7
Average Assessed Rank
7 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • misherone Avatar
Ad