Skip to content

Commit 6fdda00

Browse files
committed
minor bug fixes
1 parent d567a3d commit 6fdda00

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lcpp.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,17 +139,17 @@ def mark_problem(user_data, mark_type, leetcode_id):
139139
# TODO pick problem with same topic and higher acceptance rate (if possible). If none, default to above line
140140
start_time = timer()
141141
elif inp.startswith('revisit'):
142-
leetcode_id = inp.split(' ')[1] if len(inp.split(' ')) > 0 else leetcode_id
142+
leetcode_id = int(inp.split(' ')[1]) if len(inp.split(' ')) > 0 else leetcode_id
143143
mark_problem(user_data, 'revisit', leetcode_id)
144144
elif inp.startswith('refresh'):
145-
leetcode_id = inp.split(' ')[1] if len(inp.split(' ')) > 0 else leetcode_id
145+
leetcode_id = int(inp.split(' ')[1]) if len(inp.split(' ')) > 0 else leetcode_id
146146
mark_problem(user_data, 'refresh', leetcode_id)
147147
elif inp.startswith('y') or inp.startswith('n'):
148148
# log entry into csv
149149
entry = inp.split(',')
150150
was_solved = 'yes' if entry[0].startswith('y') else 'no'
151151
num_errs = entry[1] if len(entry) > 1 else '0'
152-
time = entry[2] if len(entry) > 2 else (timer() - start_time)//60
152+
time = entry[2] if len(entry) > 2 else round((timer()-start_time)/60)
153153

154154
mark_completed(leetcode_id, was_solved, num_errs, time)
155155
break

0 commit comments

Comments
 (0)