結果
| 問題 | No.2692 How Many Times Reached? |
| コンテスト | |
| ユーザー |
sharu
|
| 提出日時 | 2024-03-23 01:17:28 |
| 言語 | Python3 (3.15.2 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 25 ms / 2,000 ms |
| + 990µs | |
| コード長 | 517 bytes |
| 記録 | |
| コンパイル時間 | 59 ms |
| コンパイル使用メモリ | 14,592 KB |
| 実行使用メモリ | 11,392 KB |
| 最終ジャッジ日時 | 2026-10-20 21:00:56 |
| 合計ジャッジ時間 | 3,723 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge6_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 44 |
ソースコード
n = int(input())
g = [input() for _ in range(n)]
ans = 0
for i in range(n):
if g[i].count("A") == n - 1 and "B" not in g[i]:
ans += 1
for j in range(n):
t = []
for i in range(n):
t.append(g[i][j])
if t.count("A") == n - 1 and "B" not in t:
ans += 1
t = []
for i in range(n):
t.append(g[i][i])
if t.count("A") == n - 1 and "B" not in t:
ans += 1
t = []
for i in range(n):
t.append(g[i][n - i - 1])
if t.count("A") == n - 1 and "B" not in t:
ans += 1
print(ans)
sharu