DefaultDict Tutorial
-
hackerrank.com Practice>Python>Collections>DefaultDict Tutorialhackerrank.com 2019. 2. 10. 14:57
DefaultDict TutorialProblem link : https://www.hackerrank.com/challenges/defaultdict-tutorial/problem Difficulty : EasyTipProblem suggest to use defaultdict(), however, it seems that just using list is better wayOne loop for list m, as per each m, to find index of m from list nthis way is better to know index from list nSolution a = list(map(int, input().split())) n = a[0] m = a[1] ns = [] ms = ..