[Huawei OD Computer-Based Test Unified Examination Computer-Based Test Paper C] Attendance Information (Java Question Solutions)

Question description

The company uses a string to represent employee attendance information

  • absent: absence from work
  • late:late
  • leaveearly: leave early
  • present: working normally

Now you need to judge whether you can get the attendance award this time based on the employee's attendance information. The conditions for getting the attendance award are as follows:

  • No more than one absence from work;
  • No consecutive late arrivals/early departures;
  • Any 7 consecutive attendance checks, no more than 3 absences/late arrivals/early departures.

Enter description

User's attendance data string

  • Number of records >= 1;
  • Input string length < 10000;
  • There is no illegal input;

like:

2
present
present absent present present leaveearly present absent

Guess you like

Origin blog.csdn.net/banxia_frontend/article/details/134964033