結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー 123ちょちょ123ちょちょ
提出日時 2020-05-03 22:14:29
言語 PHP
(8.3.4)
結果
AC  
実行時間 55 ms / 2,000 ms
コード長 150 bytes
コンパイル時間 950 ms
コンパイル使用メモリ 11,952 KB
実行使用メモリ 22,164 KB
最終ジャッジ日時 2023-09-05 06:30:15
合計ジャッジ時間 3,007 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
12,244 KB
testcase_01 AC 7 ms
12,340 KB
testcase_02 AC 7 ms
12,284 KB
testcase_03 AC 8 ms
12,280 KB
testcase_04 AC 7 ms
12,248 KB
testcase_05 AC 7 ms
12,164 KB
testcase_06 AC 8 ms
12,164 KB
testcase_07 AC 8 ms
12,336 KB
testcase_08 AC 15 ms
15,936 KB
testcase_09 AC 20 ms
17,916 KB
testcase_10 AC 46 ms
22,152 KB
testcase_11 AC 47 ms
22,152 KB
testcase_12 AC 48 ms
22,104 KB
testcase_13 AC 48 ms
22,164 KB
testcase_14 AC 49 ms
22,028 KB
testcase_15 AC 50 ms
22,104 KB
testcase_16 AC 55 ms
22,108 KB
testcase_17 AC 8 ms
12,260 KB
testcase_18 AC 7 ms
12,332 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php

$a = trim(fgets(STDIN));
$array = explode(' ', trim(fgets(STDIN)));
$sum = 0;
for($i=0;$i<$a;$i++){
    $sum += $array[$i];
}
echo $sum . "\n";
0