結果

問題 No.712 赤旗
ユーザー hooooyaerthooooyaert
提出日時 2018-07-21 19:50:31
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 701 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 10,536 KB
実行使用メモリ 29,604 KB
最終ジャッジ日時 2023-08-27 00:43:47
合計ジャッジ時間 1,368 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np
def count(N,M):
    num=0
    for i in range(N):
        for j in range(M):
            if A[i][j] == 'W':
                num += 1
    return num
"""
#入力ゾーン
num =0
A = []
matrix = []
with open('712_1.txt','r') as f:
    for line in f:
        num+=1
        if num==1:
            matrix=line.split()
            row = int(matrix[0])
            column = int(matrix[1])
        else:
            A.append(str(line.strip()))
"""
#入力(手入力)
matrix = input().split()
A = []
row = int(matrix[0])
column = int(matrix[1])
for i in range(int(matrix[0])):
    A.append(input())

#出力ゾーン
print('塗る回数',count(row,column))
0