結果

問題 No.289 数字を全て足そう
ユーザー sorchsorch
提出日時 2020-12-26 18:19:37
言語 PHP
(8.3.4)
結果
AC  
実行時間 46 ms / 1,000 ms
コード長 230 bytes
コンパイル時間 3,899 ms
コンパイル使用メモリ 30,764 KB
実行使用メモリ 31,500 KB
最終ジャッジ日時 2023-10-25 01:53:43
合計ジャッジ時間 6,713 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
31,500 KB
testcase_01 AC 44 ms
31,500 KB
testcase_02 AC 43 ms
31,500 KB
testcase_03 AC 43 ms
31,460 KB
testcase_04 AC 43 ms
31,460 KB
testcase_05 AC 44 ms
31,460 KB
testcase_06 AC 43 ms
31,460 KB
testcase_07 AC 43 ms
31,460 KB
testcase_08 AC 44 ms
31,460 KB
testcase_09 AC 43 ms
31,460 KB
testcase_10 AC 44 ms
31,460 KB
testcase_11 AC 43 ms
31,460 KB
testcase_12 AC 44 ms
31,460 KB
testcase_13 AC 45 ms
31,460 KB
testcase_14 AC 46 ms
31,460 KB
testcase_15 AC 45 ms
31,460 KB
testcase_16 AC 44 ms
31,460 KB
testcase_17 AC 45 ms
31,456 KB
testcase_18 AC 44 ms
31,456 KB
testcase_19 AC 43 ms
31,456 KB
testcase_20 AC 43 ms
31,456 KB
testcase_21 AC 42 ms
31,456 KB
testcase_22 AC 44 ms
31,456 KB
testcase_23 AC 46 ms
31,456 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php

/**
 * @see https://yukicoder.me/problems/no/289
 */

$ret = 0;

$inputChars = str_split(trim(fgets(STDIN)));

foreach ($inputChars as $char) {
    if (is_numeric($char)) {
        $ret += $char;
    }
}

echo $ret . "\n";
0