結果

問題 No.1390 Get together
ユーザー Shiro YangShiro Yang
提出日時 2024-01-27 17:15:50
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 242 bytes
コンパイル時間 316 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 98,396 KB
最終ジャッジ日時 2024-01-27 17:15:58
合計ジャッジ時間 7,089 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,332 KB
testcase_01 AC 38 ms
53,332 KB
testcase_02 AC 39 ms
53,332 KB
testcase_03 AC 70 ms
72,968 KB
testcase_04 AC 68 ms
72,960 KB
testcase_05 WA -
testcase_06 AC 68 ms
72,960 KB
testcase_07 WA -
testcase_08 AC 70 ms
72,960 KB
testcase_09 AC 72 ms
73,224 KB
testcase_10 AC 38 ms
53,332 KB
testcase_11 WA -
testcase_12 AC 39 ms
53,332 KB
testcase_13 WA -
testcase_14 AC 40 ms
53,332 KB
testcase_15 AC 39 ms
53,332 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 162 ms
82,652 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 246 ms
98,264 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict

N, M = map(int, input().split())
d = defaultdict(list)

for _ in range(N):
    b, c = map(int, input().split())
    d[c].append(b)
    
ans = 0
for value in d.values():
    ans += len(value) - 1
print(ans)
0