- Notifications
You must be signed in to change notification settings - Fork49
Addlikes anddislikes property to problem description#3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -152,14 +152,20 @@ function showProblem(problem, argv) { | ||
| log.printf('* %s', problem.category); | ||
| log.printf('* %s (%s%%)', h.prettyLevel(problem.level), problem.percent.toFixed(2)); | ||
| if (problem.likes) | ||
| log.printf('* Likes: %s', problem.likes); | ||
| if (problem.dislikes) | ||
| log.printf('* Dislikes: %s', problem.dislikes); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Do we need to align the whitespaces here? Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Since the console output is only needed for data extraction, whitespace alignment is not needed...I just wrote it this way to be in consistency with the old | ||
| else | ||
| log.printf('* Dislikes: -'); | ||
| if (problem.totalAC) | ||
| log.printf('* Total Accepted: %s', problem.totalAC); | ||
| if (problem.totalSubmit) | ||
| log.printf('* Total Submissions: %s', problem.totalSubmit); | ||
| if (problem.testable && problem.testcase) | ||
| log.printf('* Testcase Example: %s', chalk.yellow(util.inspect(problem.testcase))); | ||
| if (filename) | ||
| log.printf('* Source Code: %s', chalk.yellow.underline(filename)); | ||
| log.info(); | ||
| log.info(problem.desc); | ||