結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー nina1186nina1186
提出日時 2018-04-24 17:48:41
言語 PHP
(8.3.4)
結果
AC  
実行時間 34 ms / 2,000 ms
コード長 158 bytes
コンパイル時間 55 ms
コンパイル使用メモリ 12,040 KB
実行使用メモリ 22,100 KB
最終ジャッジ日時 2023-09-09 23:36:39
合計ジャッジ時間 1,749 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
12,264 KB
testcase_01 AC 7 ms
12,300 KB
testcase_02 AC 7 ms
12,200 KB
testcase_03 AC 7 ms
12,248 KB
testcase_04 AC 7 ms
12,252 KB
testcase_05 AC 7 ms
12,284 KB
testcase_06 AC 8 ms
12,228 KB
testcase_07 AC 8 ms
12,204 KB
testcase_08 AC 13 ms
15,820 KB
testcase_09 AC 16 ms
17,876 KB
testcase_10 AC 29 ms
22,056 KB
testcase_11 AC 30 ms
22,024 KB
testcase_12 AC 30 ms
22,016 KB
testcase_13 AC 31 ms
22,072 KB
testcase_14 AC 31 ms
21,992 KB
testcase_15 AC 32 ms
22,100 KB
testcase_16 AC 34 ms
22,048 KB
testcase_17 AC 8 ms
12,208 KB
testcase_18 AC 7 ms
12,236 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
fscanf(STDIN, '%d', $N);
$degits = explode(' ', trim(fgets(STDIN)));
$total = 0;
foreach($degits as $value){
  $total += intval($value);
}

echo $total;
0