Let \(E = emf\) of each cell, \(S =\) specific heat capacity of the material of the wire. For the first wire, current
\({i_1} = \frac{{3E}}{R}\) and \(i_1^2Rt = mS\Delta T\)
For the second wire, \({i_2} = \frac{{NE}}{{2R}}\) and \(i_2^2(2R)t = 2\,mS\Delta T\). Thus, \({i_1} = {i_2}\) or \(N = 6\).