結果
問題 |
No.2052 Indegree
|
ユーザー |
![]() |
提出日時 | 2025-03-20 18:39:15 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 40 ms / 2,000 ms |
コード長 | 233 bytes |
コンパイル時間 | 190 ms |
コンパイル使用メモリ | 82,624 KB |
実行使用メモリ | 53,932 KB |
最終ジャッジ日時 | 2025-03-20 18:39:17 |
合計ジャッジ時間 | 1,804 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 20 |
ソースコード
n, m = map(int, input().split()) in_degree = [0] * (n + 1) for _ in range(m): a, b = map(int, input().split()) in_degree[b] += 1 count = 0 for i in range(1, n + 1): if in_degree[i] == 0: count += 1 print(count)