結果

問題 No.938 賢人を探せ
ユーザー ThetaTheta
提出日時 2022-10-25 18:30:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 73 ms / 2,000 ms
コード長 342 bytes
コンパイル時間 275 ms
コンパイル使用メモリ 10,560 KB
実行使用メモリ 11,548 KB
最終ジャッジ日時 2023-09-16 16:14:39
合計ジャッジ時間 2,766 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
11,548 KB
testcase_01 AC 15 ms
7,760 KB
testcase_02 AC 15 ms
7,768 KB
testcase_03 AC 15 ms
7,760 KB
testcase_04 AC 15 ms
7,824 KB
testcase_05 AC 15 ms
7,932 KB
testcase_06 AC 14 ms
7,844 KB
testcase_07 AC 14 ms
7,844 KB
testcase_08 AC 51 ms
9,616 KB
testcase_09 AC 53 ms
9,672 KB
testcase_10 AC 15 ms
7,952 KB
testcase_11 AC 58 ms
9,872 KB
testcase_12 AC 49 ms
9,672 KB
testcase_13 AC 49 ms
9,644 KB
testcase_14 AC 49 ms
9,688 KB
testcase_15 AC 50 ms
9,676 KB
testcase_16 AC 49 ms
9,696 KB
testcase_17 AC 51 ms
9,600 KB
testcase_18 AC 49 ms
9,604 KB
testcase_19 AC 51 ms
9,628 KB
testcase_20 AC 50 ms
9,512 KB
testcase_21 AC 50 ms
9,504 KB
testcase_22 AC 73 ms
11,524 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    members = {}
    for _ in range(int(input())):
        A, B = input().split()

        members[A] = "cheater"
        if B not in members:
            members[B] = "clever"

    for clever_member in filter(lambda name: members[name] == "clever", members):
        print(clever_member)


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