⌨️

[AtCoder]ABC-280|A - Pawn on a Grid

2023/08/08に公開

設問ページ

提出結果

def getIntMap():
    return map(int, input().split())


def getStringRow(N):
    return [input() for _ in range(N)]


def main():
    h, w = getIntMap()
    s = getStringRow(h)

    c = 0
    for r in s:
        c += r.count('#')
    print(c)


if __name__ == "__main__":
    main()

Discussion