Post History
Ruby, 44 bytes ->p,n{n*=I while I=p.find{_1*n%1==0};n.to_i} Attempt This Online!
Answer
#2: Post edited
# [Ruby](https://www.ruby-lang.org/), 42 bytes<pre><code class="lang-ruby">->p,n{n*=I while I=p.find{_1*n==0};n.to_i}</code></pre>[Attempt This Online!](https://ato.pxeger.com/run?1=m72kqDSpcsGiNNulpSVpuhY3tXTtCnTyqvO0bD0VyjMyc1IVPG0L9NIy81Kq4w218mxtDWqt8_RK8uMza6E6TAsU0qKjTUxN9Y2Ni3QUDA31DcG0vqEhkDLWN4cIGoHFjItidRTMjWK5IJoXLIDQAA)
- # [Ruby](https://www.ruby-lang.org/), 44 bytes
- <pre><code class="lang-ruby">->p,n{n*=I while I=p.find{_1*n%1==0};n.to_i}</code></pre>
- [Attempt This Online!](https://ato.pxeger.com/run?1=m72kqDSpcsGiNNulpSVpuhY3dXTtCnTyqvO0bD0VyjMyc1IVPG0L9NIy81Kq4w218lQNbW0Naq3z9Ery4zNroXpMCxTSoqNNTE31jY2LdBQMDfUNwbS-oSGQMtY3hwgagcWMi2J1FMyNYrkgmhcsgNAA)
#1: Initial revision
# [Ruby](https://www.ruby-lang.org/), 42 bytes <pre><code class="lang-ruby">->p,n{n*=I while I=p.find{_1*n==0};n.to_i}</code></pre> [Attempt This Online!](https://ato.pxeger.com/run?1=m72kqDSpcsGiNNulpSVpuhY3tXTtCnTyqvO0bD0VyjMyc1IVPG0L9NIy81Kq4w218mxtDWqt8_RK8uMza6E6TAsU0qKjTUxN9Y2Ni3QUDA31DcG0vqEhkDLWN4cIGoHFjItidRTMjWK5IJoXLIDQAA)