結果

問題 No.792 真理関数をつくろう
ユーザー MisterMister
提出日時 2020-04-10 18:49:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 703 bytes
コンパイル時間 106 ms
コンパイル使用メモリ 11,008 KB
実行使用メモリ 9,244 KB
最終ジャッジ日時 2023-10-13 11:12:50
合計ジャッジ時間 2,514 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,888 KB
testcase_01 AC 19 ms
8,280 KB
testcase_02 AC 17 ms
7,952 KB
testcase_03 AC 24 ms
8,304 KB
testcase_04 AC 16 ms
7,812 KB
testcase_05 AC 24 ms
8,304 KB
testcase_06 AC 46 ms
8,636 KB
testcase_07 AC 18 ms
7,892 KB
testcase_08 AC 16 ms
7,856 KB
testcase_09 AC 16 ms
7,888 KB
testcase_10 AC 16 ms
7,776 KB
testcase_11 AC 16 ms
7,808 KB
testcase_12 AC 16 ms
7,788 KB
testcase_13 AC 16 ms
7,892 KB
testcase_14 AC 16 ms
7,856 KB
testcase_15 AC 16 ms
7,924 KB
testcase_16 AC 30 ms
8,452 KB
testcase_17 AC 16 ms
7,852 KB
testcase_18 AC 16 ms
7,956 KB
testcase_19 AC 16 ms
7,896 KB
testcase_20 AC 33 ms
7,896 KB
testcase_21 AC 57 ms
9,244 KB
testcase_22 AC 16 ms
7,952 KB
testcase_23 AC 16 ms
7,868 KB
testcase_24 WA -
testcase_25 AC 16 ms
7,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

cnot = chr(172)
cand = chr(8743)
cor = chr(8744)
cbot = chr(8869)


def main():
    n = int(input())

    ans = ""

    for _ in range(2 ** n):
        v = list(map(int, input().split()))
        if v[-1] == 0:
            continue

        ans += "A=" if len(ans) == 0 else cor

        ans += "("

        for i in range(n):
            if i != 0:
                ans += cand
            if v[i] == 0:
                ans += cnot
            ans += "P_"
            ans += str(i + 1)

        ans += ")"

    if len(ans) == 0:
        ans = "A=" + cbot

    print(ans)


def checkord():
    s = input()
    for c in s:
        print(c, ord(c))


if __name__ == "__main__":
    # checkord()
    main()
0