<jupyter_start><jupyter_text>2020년 11월 3일 화요일 leetCode - Count Negative Numbers in a Sorted Matrix (Python) 문제 : https://leetcode.com/problems/count-negative-numbers-in-a-sorted-matrix/ 블로그 : https://somjang.tistory.com/entry/leetCode-1351-Count-Negative-Numbers-in-a-Sorted-Matrix-Python  첫번째 시도<jupyter_code>class Solution:
    def countNegatives(self, grid: List[List[int]]) -> int:
        answer = 0
        
        for i in range(len(grid)):
            if grid[i][-1] < 0:
                for j in range(len(grid[i])-1, -1, -1):
                    if grid[i][j] >= 0:
                        break
                    else:
                        answer = answer + 1
            else:
                continue
        return answer<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11932555123216602, 'fraction_numerical': 0.02464332036316472, 'mean_word_length': 1.7971014492753623, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '372325', 'license': 'MIT', 'n_tokens_mistral': 279, 'n_tokens_neox': 269, 'n_words': 52, 'path': 'DAY 201 ~ 300/DAY249_[leetCode] Count Negative Numbers in a Sorted Matrix (Python).ipynb', 'repo_name': 'SOMJANG/CODINGTEST_PRACTICE', 'size': '771'}