結果

問題 No.2692 How Many Times Reached?
コンテスト
ユーザー Butterflv
提出日時 2024-04-30 11:11:45
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 487 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 161 ms
コンパイル使用メモリ 85,504 KB
実行使用メモリ 59,776 KB
最終ジャッジ日時 2026-05-14 06:15:10
合計ジャッジ時間 2,969 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20 WA * 23
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N=int(input())
S=[input() for i in range(N)]
ans=0
for i in range(N):
  if S[i].count("A")==N-1 and S[i].count(".")==1:
    ans+=1
for i in range(N):
  arr=[]
  for j in range(N):
    arr.append(S[j][i])
  if arr.count("A")==N-1 and S[i].count(".")==1:
    ans+=1
arr=[]
for i in range(N):
  arr.append(S[i][i])
if arr.count("A")==N-1 and arr.count(".")==1:
  ans+=1

arr=[]
for i in range(N):
  arr.append(S[i][N-i-1])
if arr.count("A")==N-1 and arr.count(".")==1:
  ans+=1

print(ans)
0