Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/commands/submit.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ cmd.handler = function(argv) {

let ratio = 0.0;
for (let score of scores) {
if (parseFloat(score[0]) > myRuntime)
if (parseFloat(score[0]) >= myRuntime)
ratio += parseFloat(score[1]);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/leetcode.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ plugin.getSubmission = function(submission, cb) {
let re = body.match(/submissionCode:\s('[^']*')/);
if (re) submission.code = eval(re[1]);

re = body.match(/distribution_formatted:\s('[^']+')/);
re = body.match(/runtimeDistributionFormatted:\s('[^']+')/);
if (re) submission.distributionChart = JSON.parse(eval(re[1]));
return cb(null, submission);
});
Expand Down