Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
count関数を count.pyに移動し、 mod.py削除
  • Loading branch information
jun68ykt committed Oct 5, 2018
1 parent 3ef2f19 commit ea54a61
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
15 changes: 14 additions & 1 deletion count.py
Expand Up @@ -2,7 +2,20 @@

import json
import sys
from mod import count


def count(name_id, indexes, data):
name_index_ary = indexes[name_id]
cnt = len(name_index_ary)

for i in name_index_ary:
code_id = data[i][1]
code_index_ary = indexes[code_id]
a = [j for j in code_index_ary if j > i]
cnt += len(a)

return cnt


m = json.load(sys.stdin)

Expand Down
11 changes: 0 additions & 11 deletions mod.py

This file was deleted.

0 comments on commit ea54a61

Please sign in to comment.