結果
問題 | No.2692 How Many Times Reached? |
ユーザー |
|
提出日時 | 2024-04-30 11:18:25 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 44 ms / 2,000 ms |
コード長 | 486 bytes |
コンパイル時間 | 320 ms |
コンパイル使用メモリ | 82,264 KB |
実行使用メモリ | 61,088 KB |
最終ジャッジ日時 | 2024-11-20 05:51:40 |
合計ジャッジ時間 | 3,393 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 43 |
ソースコード
N=int(input())S=[input() for i in range(N)]ans=0for i in range(N):if S[i].count("A")==N-1 and S[i].count(".")==1:ans+=1for i in range(N):arr=[]for j in range(N):arr.append(S[j][i])if arr.count("A")==N-1 and arr.count(".")==1:ans+=1arr=[]for i in range(N):arr.append(S[i][i])if arr.count("A")==N-1 and arr.count(".")==1:ans+=1arr=[]for i in range(N):arr.append(S[i][N-i-1])if arr.count("A")==N-1 and arr.count(".")==1:ans+=1print(ans)