結果

問題 No.289 数字を全て足そう
ユーザー mondomondo
提出日時 2019-07-24 17:51:51
言語 PHP
(8.3.4)
結果
AC  
実行時間 8 ms / 1,000 ms
コード長 170 bytes
コンパイル時間 257 ms
コンパイル使用メモリ 10,304 KB
実行使用メモリ 10,924 KB
最終ジャッジ日時 2023-09-10 10:22:04
合計ジャッジ時間 1,700 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
10,424 KB
testcase_01 AC 7 ms
10,372 KB
testcase_02 AC 7 ms
10,368 KB
testcase_03 AC 7 ms
10,504 KB
testcase_04 AC 7 ms
10,492 KB
testcase_05 AC 8 ms
10,508 KB
testcase_06 AC 7 ms
10,448 KB
testcase_07 AC 8 ms
10,540 KB
testcase_08 AC 8 ms
10,568 KB
testcase_09 AC 7 ms
10,508 KB
testcase_10 AC 8 ms
10,524 KB
testcase_11 AC 7 ms
10,552 KB
testcase_12 AC 8 ms
10,560 KB
testcase_13 AC 7 ms
10,400 KB
testcase_14 AC 8 ms
10,588 KB
testcase_15 AC 7 ms
10,516 KB
testcase_16 AC 7 ms
10,476 KB
testcase_17 AC 7 ms
10,536 KB
testcase_18 AC 8 ms
10,508 KB
testcase_19 AC 7 ms
10,524 KB
testcase_20 AC 8 ms
10,532 KB
testcase_21 AC 7 ms
10,428 KB
testcase_22 AC 8 ms
10,548 KB
testcase_23 AC 8 ms
10,924 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$s = trim(fgets(STDIN));
//正規表現の置換
$s = preg_replace('/[^0-9]/','', $s);
//文字列を配列に置換
$array = str_split($s);
echo array_sum($array);
0