結果

問題 No.938 賢人を探せ
ユーザー komkompikomkompi
提出日時 2020-05-01 20:08:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 105 ms / 2,000 ms
コード長 320 bytes
コンパイル時間 165 ms
コンパイル使用メモリ 10,764 KB
実行使用メモリ 14,868 KB
最終ジャッジ日時 2023-08-21 03:45:21
合計ジャッジ時間 2,461 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 105 ms
14,868 KB
testcase_01 AC 15 ms
7,904 KB
testcase_02 AC 15 ms
7,948 KB
testcase_03 AC 16 ms
7,824 KB
testcase_04 AC 15 ms
7,860 KB
testcase_05 AC 15 ms
7,796 KB
testcase_06 AC 15 ms
7,804 KB
testcase_07 AC 16 ms
7,780 KB
testcase_08 AC 70 ms
11,372 KB
testcase_09 AC 69 ms
11,804 KB
testcase_10 AC 15 ms
7,904 KB
testcase_11 AC 77 ms
12,240 KB
testcase_12 AC 66 ms
11,620 KB
testcase_13 AC 66 ms
11,624 KB
testcase_14 AC 65 ms
11,660 KB
testcase_15 AC 67 ms
11,612 KB
testcase_16 AC 66 ms
11,664 KB
testcase_17 AC 68 ms
11,792 KB
testcase_18 AC 66 ms
11,724 KB
testcase_19 AC 67 ms
11,656 KB
testcase_20 AC 66 ms
11,592 KB
testcase_21 AC 65 ms
11,760 KB
testcase_22 AC 96 ms
14,648 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
# Your code here!
N=int(input())
org=[]
dic={}
for _ in range(N):
    A,B=input().split()
    org.append(B)
    if A in dic:
        dic[A][0]+=1
    else:
        dic[A]=[1,0]
    
    if B in dic:
        dic[B][1]+=1
    else:
        dic[B]=[0,1]

for k in dic:
    if dic[k][0]==0:
        print(k)
0