結果

問題 No.938 賢人を探せ
ユーザー masumasumath1masumasumath1
提出日時 2019-12-01 17:54:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 747 ms / 2,000 ms
コード長 193 bytes
コンパイル時間 337 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 77,824 KB
最終ジャッジ日時 2024-05-08 08:59:06
合計ジャッジ時間 9,468 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 747 ms
77,824 KB
testcase_01 AC 42 ms
51,712 KB
testcase_02 AC 42 ms
51,456 KB
testcase_03 AC 41 ms
51,968 KB
testcase_04 AC 41 ms
51,712 KB
testcase_05 AC 42 ms
51,968 KB
testcase_06 AC 41 ms
51,328 KB
testcase_07 AC 42 ms
51,456 KB
testcase_08 AC 240 ms
77,184 KB
testcase_09 AC 228 ms
77,312 KB
testcase_10 AC 42 ms
51,584 KB
testcase_11 AC 385 ms
77,568 KB
testcase_12 AC 493 ms
77,056 KB
testcase_13 AC 502 ms
76,928 KB
testcase_14 AC 489 ms
77,184 KB
testcase_15 AC 497 ms
77,184 KB
testcase_16 AC 501 ms
76,800 KB
testcase_17 AC 501 ms
76,800 KB
testcase_18 AC 492 ms
76,928 KB
testcase_19 AC 487 ms
77,184 KB
testcase_20 AC 494 ms
76,928 KB
testcase_21 AC 498 ms
77,312 KB
testcase_22 AC 705 ms
77,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
B = set()
A = []
for i in range(N):
    b,a = input().split()
    B.add(b)
    if not a in B and not a in A:
        A.append(a)
for a in A:
    if a not in B:
        print(a)
0