Leetcode 1904完整对局
这个题如果开始写之前思路清晰,其实非常简单。
附上代码:
class Solution {
public:
int check(int srt, int end){
srt = ceil(srt/15.0);
end = floor(end/15.0);
return max(end - srt, 0);
}
int numberOfRounds(string startTime, string finishTime) {
原创
2021-07-22 18:02:28 ·
71 阅读 ·
0 评论