Leetcode Student Discount LeetCode offers a student discount plan to help students save money for other things, especially in times like this when the cost of attending universities is very high. Currently, this company offers a student discount of about 38%. ...
01 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第125题(顺位题号是551)。您将获得一个表示学生出勤记录的字符串。 该记录仅包含以下三个字符: 'A':缺席。 'L':迟到。 'P':在场。 如果学生的出勤记录不超过一个“A”(缺席)或超过两个连续的“L”(迟到),则可以奖励学生。您需要返回学生是否可以根...
You are given a string representing an attendance record for a student. The record only contains the following three characters: 'A' : Absent. 'L' : Late. 'P' : Present. A student could be rewarded if his attendance record doesn't contain more than one 'A' (absent) or more than two...
如果一个学生的出勤记录中不超过一个'A'(缺勤)并且不超过两个连续的'L'(迟到),那么这个学生会被奖赏。 你需要根据这个学生的出勤记录判断他是否会被奖赏。 示例1: 输入: "PPALLP"输出: True 示例2: 输入: "PPALLL"输出: False 解法: classSolution{public:boolcheckRecord(string s){intsz = s.size();...
552. Student Attendance Record II 552. Student Attendance Record II Given a positive integer n, return the number of all possible attendance records with length n, which will be regarded as rewardable. The answer may be very large, re......
1894-find-the-student-that-will-replace-the-chalk Time: 96 ms (57.54%), Space: 77 MB (22.40%) - LeetHub Sep 2, 2024 1897-redistribute-characters-to-make-all-strings-equal Time: 44 ms (5.06%), Space: 12.1 MB (68.09%) - LeetHub Dec 30, 2023 ...
可以用字符串表示一个学生的出勤记录,其中的每个字符用来标记当天的出勤情况(缺勤、迟到、到场)。记录中只含下面三种字符: 'A':Absent,缺勤 'L':Late,迟到 'P':Present,到场 如果学生能够同时满足下面两个条件,则可以获得出勤奖励: 按总出勤计,学生缺勤('A')严格少于两天。
给你一个字符串 s 表示一个学生的出勤记录,其中的每个字符用来标记当天的出勤情况(缺勤、迟到、到场)。记录中只含下面三种字符: 'A':Absent,缺勤 'L':Late,迟到 'P':Present,到场 如果学生能够 同时 满足下面两个条件,则可以获得出勤奖励: 按总出勤 计,学生缺勤('A')严格 少于两天。 学生不会 存在连续 ...
18 changes: 18 additions & 0 deletions 18 551. Student Attendance Record I Original file line numberDiff line numberDiff line change @@ -0,0 +1,18 @@ 551. Student Attendance Record Ihttps://leetcode.com/problems/student-attendance-record-i/...
提交记录 Student = | student_id | student_name | gender | dept_id | | --- | --- | --- | --- | | 1 | Jack | M | 1 | | 2 | Jane | F | 1 | | 3 | Mark | M | 2 | Department = | dept_id | dept_name | | --...