結果

問題 No.1586 Equal Array
ユーザー mohu moffu
提出日時 2021-07-14 01:06:54
言語 PHP
(843.2)
結果
WA  
実行時間 -
コード長 236 bytes
コンパイル時間 1,931 ms
コンパイル使用メモリ 31,504 KB
実行使用メモリ 32,400 KB
最終ジャッジ日時 2024-07-02 21:54:41
合計ジャッジ時間 2,875 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
No syntax errors detected in Main.php

ソースコード

diff #

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