<?php # 整数の入力 fscanf(STDIN, "%lf", $N); fscanf(STDIN, "%d", $M); $i=floor($N/($M*1000)); # 出力 echo sprintf("%d\n",($i*1000)); ?>