<?php $num = array(1=>1); for($i = 1 ; $i <= 100 ; $i++) { $count = count($num); for($j = 1 ; $j <= $count ; $j++) { $num[$j] *= $i; } for($j = 1 ; $j <= count($num) ; $j++) { while(@$num[$j] >= 10) { @$num[$j + 1] ++; $num[$j] -= 10; } } } $answer = array_sum($num); echo $answer; ?>