結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー HisashishimokawaHisashishimokawa
提出日時 2017-04-26 12:49:39
言語 PHP
(8.3.4)
結果
AC  
実行時間 57 ms / 2,000 ms
コード長 165 bytes
コンパイル時間 477 ms
コンパイル使用メモリ 12,104 KB
実行使用メモリ 22,160 KB
最終ジャッジ日時 2023-10-11 15:14:26
合計ジャッジ時間 2,073 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
12,176 KB
testcase_01 AC 7 ms
12,316 KB
testcase_02 AC 8 ms
12,168 KB
testcase_03 AC 7 ms
12,176 KB
testcase_04 AC 7 ms
12,232 KB
testcase_05 AC 7 ms
12,192 KB
testcase_06 AC 8 ms
12,176 KB
testcase_07 AC 9 ms
12,260 KB
testcase_08 AC 15 ms
15,780 KB
testcase_09 AC 20 ms
17,864 KB
testcase_10 AC 47 ms
22,084 KB
testcase_11 AC 48 ms
22,096 KB
testcase_12 AC 49 ms
22,160 KB
testcase_13 AC 50 ms
22,096 KB
testcase_14 AC 51 ms
22,104 KB
testcase_15 AC 52 ms
22,076 KB
testcase_16 AC 57 ms
22,040 KB
testcase_17 AC 7 ms
12,240 KB
testcase_18 AC 7 ms
12,236 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php

$num = fgets(STDIN);
$array = explode(" ",fgets(STDIN));
$ans = 0;
for($i=0 ; $i < $num ; $i++){
    $ans += $array[$i];
};
echo $ans;
echo "\n";
?>
0