結果

問題 No.3094 Character Table
ユーザー ああいいああいい
提出日時 2022-04-01 22:03:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 74 ms / 2,000 ms
コード長 458 bytes
コンパイル時間 1,139 ms
コンパイル使用メモリ 86,584 KB
実行使用メモリ 71,396 KB
最終ジャッジ日時 2023-08-12 19:00:06
合計ジャッジ時間 4,005 ms
ジャッジサーバーID
(参考情報)
judge10 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,396 KB
testcase_01 AC 72 ms
71,224 KB
testcase_02 AC 72 ms
70,816 KB
testcase_03 AC 73 ms
71,232 KB
testcase_04 AC 74 ms
71,060 KB
testcase_05 AC 70 ms
71,348 KB
testcase_06 AC 71 ms
71,136 KB
testcase_07 AC 71 ms
71,332 KB
testcase_08 AC 71 ms
71,160 KB
testcase_09 AC 71 ms
71,012 KB
testcase_10 AC 71 ms
71,272 KB
testcase_11 AC 72 ms
71,328 KB
testcase_12 AC 70 ms
71,360 KB
testcase_13 AC 71 ms
71,228 KB
testcase_14 AC 74 ms
71,276 KB
testcase_15 AC 71 ms
71,264 KB
testcase_16 AC 72 ms
71,196 KB
testcase_17 AC 72 ms
71,136 KB
testcase_18 AC 72 ms
70,972 KB
testcase_19 AC 72 ms
71,160 KB
testcase_20 AC 72 ms
71,092 KB
testcase_21 AC 71 ms
70,964 KB
testcase_22 AC 72 ms
70,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = [input().split() for _ in range(N)]
import sys
if N == 1:
    print(1)
    exit()
    
for h in range(N):
    for w in range(N):
        if A[h][w] == "?":
            x,y = h,w
        else:
            A[h][w] = int(A[h][w])
u = -1
for w in range(N):
    if w == y:continue
    if A[x][w] != 0:
        u = w
        break
num = 0
for h in range(N):
    if h == x:continue
    num += A[h][y] * A[h][u]
ans = -num // A[x][u]
print(ans)
0