結果
問題 | No.2692 How Many Times Reached? |
ユーザー |
👑 |
提出日時 | 2024-03-22 21:29:40 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 32 ms / 2,000 ms |
コード長 | 373 bytes |
コンパイル時間 | 308 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-09-30 10:52:21 |
合計ジャッジ時間 | 2,656 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 43 |
ソースコード
R,I=range,inputN=int(I())S=[I()for n in R(N)]a=0for i in R(N):a+=sum(S[i][j]=='.'for j in R(N))==1 and all(S[i][j]!='B'for j in R(N))a+=sum(S[j][i]=='.'for j in R(N))==1 and all(S[j][i]!='B'for j in R(N))a+=sum(S[j][j]=='.'for j in R(N))==1 and all(S[j][j]!='B'for j in R(N))a+=sum(S[N-1-j][j]=='.'for j in R(N))==1 and all(S[N-1-j][j]!='B'for j in R(N))print(a)