-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Steve Ren
authored and
Steve Ren
committed
Oct 3, 2020
1 parent
7cc02ce
commit c32a259
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
test.py | ||
test1.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from collections import defaultdict | ||
|
||
dic = defaultdict(int) | ||
res = [] | ||
|
||
while True: | ||
try: | ||
s = input() | ||
if s == '': break | ||
s = s.split(' ') | ||
fn = s[0].split('\\')[-1][-16:] | ||
ln = s[-1] | ||
dic[fn+ln] += 1 | ||
res.append([fn, ln, str(dic[fn+ln])]) | ||
except: | ||
break | ||
|
||
for i in res[-8:]: | ||
print(' '.join(i)) |