結果
| 問題 |
No.2692 How Many Times Reached?
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-22 22:50:58 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 636 bytes |
| コンパイル時間 | 245 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-09-30 12:16:03 |
| 合計ジャッジ時間 | 2,918 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 25 WA * 18 |
ソースコード
n = int(input())
S = [list(input()) for _ in range(n)]
#print(S)
#print([r[0] for r in S])
ans = 0
#hoizon check
for i in range(n):
if "B" in S[i]:
#print(S[i])
continue;
count = S[i].count('.')
#count = len([s for s in S[i] if "." in S[i]])
if count == 1:
#print(S[i])
ans = ans+1
#vertical check
for i in range(n):
if "B" in [r[i] for r in S]:
#print([r[i] for r in S])
continue;
#print([r[i] for r in S])
VS=[r[i] for r in S]
#print(VS)
count = VS.count('.')
#print(count)
if count == 1:
#print(S[i])
ans = ans+1
print(ans)