Strike or Spare | CodeChef

Strike or Spare ;
can anyone tell me actual probabiliyt by solving