Two cylinders A and B fitted with pistons contain equal amounts of an ideal diatomic gas at 300 K. The piston of A is free to move, while that of B is held fixed. The same amount of heat is given to the gas in each cylinder. If the rise in temperature of the gas in A is 30 K, then the rise in temperature of the gas in B is
30 K
18 K
50 K
42 k
Heat is given to the gas in cylinder A at constant pressure while the same amount of heat is given to the gas in cylinder B at constant volume. Heat given to gas in A is