結果

問題 No.43 野球の試合
ユーザー szkhtsszkhts
提出日時 2023-07-30 08:12:56
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 396 bytes
コンパイル時間 159 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-17 09:28:55
合計ジャッジ時間 1,092 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,752 KB
testcase_01 AC 31 ms
10,752 KB
testcase_02 AC 29 ms
10,752 KB
testcase_03 AC 29 ms
10,752 KB
testcase_04 WA -
testcase_05 AC 30 ms
10,752 KB
testcase_06 AC 29 ms
10,752 KB
testcase_07 AC 29 ms
10,752 KB
testcase_08 AC 29 ms
10,752 KB
testcase_09 AC 29 ms
10,880 KB
testcase_10 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
matrix = []

for _ in range(n):
    matrix.append(list(input()))

for y in range(n):
    for x in range(n):
        if matrix[y][x] == '-':
            matrix[y][x] = 'o'
            matrix[x][y] = 'x'

rank = []
for m in matrix:
    rank.append(m.count('o'))

r = rank[0]
rank_s = set(rank)
rank_t = list(rank_s)
rank_u = sorted(rank_t, reverse=True)
print(rank_u.index(r) + 1) 
0