結果
問題 | No.938 賢人を探せ |
ユーザー |
|
提出日時 | 2021-11-08 18:20:48 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 152 ms / 2,000 ms |
コード長 | 194 bytes |
コンパイル時間 | 103 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 18,152 KB |
最終ジャッジ日時 | 2024-11-16 14:36:09 |
合計ジャッジ時間 | 4,474 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 21 |
コンパイルメッセージ
Syntax OK
ソースコード
N = gets.to_i hashA = {} hashB = {} N.times { a, b = gets.strip.split(" ") hashA[a] = true hashB.delete(a) if hashB.include?(a) hashB[b] = true if not hashA.include?(b) } puts hashB.keys