結果

問題 No.938 賢人を探せ
ユーザー masumasumath1masumasumath1
提出日時 2019-12-01 17:54:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 699 ms / 2,000 ms
コード長 193 bytes
コンパイル時間 980 ms
コンパイル使用メモリ 86,908 KB
実行使用メモリ 78,952 KB
最終ジャッジ日時 2023-08-21 03:31:12
合計ジャッジ時間 9,853 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 699 ms
78,952 KB
testcase_01 AC 72 ms
71,156 KB
testcase_02 AC 74 ms
71,296 KB
testcase_03 AC 71 ms
71,308 KB
testcase_04 AC 73 ms
71,168 KB
testcase_05 AC 71 ms
71,132 KB
testcase_06 AC 73 ms
71,108 KB
testcase_07 AC 72 ms
71,492 KB
testcase_08 AC 214 ms
77,860 KB
testcase_09 AC 205 ms
78,048 KB
testcase_10 AC 73 ms
71,040 KB
testcase_11 AC 338 ms
78,012 KB
testcase_12 AC 436 ms
77,884 KB
testcase_13 AC 427 ms
77,944 KB
testcase_14 AC 432 ms
77,888 KB
testcase_15 AC 427 ms
78,104 KB
testcase_16 AC 431 ms
77,980 KB
testcase_17 AC 428 ms
77,692 KB
testcase_18 AC 429 ms
77,976 KB
testcase_19 AC 419 ms
78,224 KB
testcase_20 AC 425 ms
77,696 KB
testcase_21 AC 427 ms
77,932 KB
testcase_22 AC 656 ms
78,844 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