結果

問題 No.1586 Equal Array
ユーザー mohu moffumohu moffu
提出日時 2021-07-14 01:42:09
言語 PHP
(8.3.4)
結果
WA  
実行時間 -
コード長 260 bytes
コンパイル時間 749 ms
コンパイル使用メモリ 12,036 KB
実行使用メモリ 542,716 KB
最終ジャッジ日時 2023-09-15 21:06:33
合計ジャッジ時間 3,693 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 8 ms
12,204 KB
testcase_02 AC 7 ms
12,208 KB
testcase_03 AC 8 ms
12,252 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 MLE -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

<?php
fscanf(STDIN,"%d",$n);
$n = (int)trim(fgets(STDIN));
$array = array();
for ($i=0; $i<$n; $i++){
  $array[] = (int)trim(fgets(STDIN));
}
$total = 0;
foreach ($array as $element){
  $total += $element;
}
$ans = ($total % $n) == 0 ? 'Yes' : 'No';
echo $ans;
0