結果
問題 |
No.2692 How Many Times Reached?
|
ユーザー |
|
提出日時 | 2024-03-22 22:02:15 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 495 bytes |
コンパイル時間 | 421 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-09-30 11:33:13 |
合計ジャッジ時間 | 2,647 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 29 WA * 14 |
ソースコード
n=int(input()) s=[] m=n while m>0: s.append(input()) m-=1 cntx=0 cnty=0 reaches=0 for i in range(n): for j in range(n): if s[i][j]=="A": cntx+=1 if s[j][i]=="A": cnty+=1 if cntx==n-1: reaches+=1 if cnty==n-1: reaches+=1 cntx=0 cnty=0 for i in range(n): if s[i][i]=="A": cntx+=1 if s[n-1-i][n-1-i]=="A": cnty+=1 if cntx==n-1: reaches+=1 if cnty==n-1: reaches+=1 print(reaches)