結果

問題 No.656 ゴルフ
ユーザー dyechidyechi
提出日時 2019-03-29 10:07:04
言語 PHP
(8.3.4)
結果
AC  
実行時間 42 ms / 2,000 ms
コード長 230 bytes
コンパイル時間 74 ms
コンパイル使用メモリ 30,592 KB
実行使用メモリ 31,140 KB
最終ジャッジ日時 2024-04-24 14:42:58
合計ジャッジ時間 1,123 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
31,016 KB
testcase_01 AC 40 ms
30,832 KB
testcase_02 AC 42 ms
30,788 KB
testcase_03 AC 41 ms
31,000 KB
testcase_04 AC 39 ms
31,140 KB
testcase_05 AC 39 ms
30,936 KB
testcase_06 AC 37 ms
31,052 KB
testcase_07 AC 36 ms
30,928 KB
testcase_08 AC 36 ms
30,964 KB
testcase_09 AC 36 ms
31,080 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
$s = trim(fgets(STDIN));
$s = str_split($s);

$total_score = 0;
for ($i=0; $i<9; $i++) {
    if ($s[$i] == "0") {
        $total_score += 10;
    } else {
        $total_score += $s[$i];
    }
}
echo $total_score.PHP_EOL;
?>
0