It is permissible to reproduce a work that has been made public in a question on an entrance examination or other examination or in an official certification of knowledge or skills, to the extent that this is found to be necessary for such purpose, and to transmit to the public such a question (except in a broadcast or cablecast; however, it is permissible to make such a question available for transmission, if it is to be transmitted to the public via automatic public transmission; the same applies in the following paragraph); provided, however, that this does not apply if the action would unreasonably prejudice the interests of the copyright owner in light of the nature or purpose of the work or the circumstances of its transmission.
A person that, for commercial purposes, reproduces a work or transmits it to the public as referred to in the preceding paragraph must pay the copyright owner compensation in an amount that corresponds to the ordinary rate of royalties.
Read this with the articles around it