3
21/10/2024 1:18 pm
トピックスターター
Write a program that reads sequence of numbers, reverses their digits, and prints their sum.
Examples:

1件の回答
2
21/10/2024 1:19 pm
My solution:
<?php
$arr = explode(" ", readline());
for ($i = 0; $i < count($arr); $i++) {
$arr[$i] = strrev($arr[$i]);
}
echo array_sum($arr);
