結果

問題 No.1586 Equal Array
ユーザー mohu moffu
提出日時 2021-07-14 01:21:02
言語 PHP
(843.2)
結果
WA  
実行時間 -
コード長 253 bytes
コンパイル時間 1,020 ms
コンパイル使用メモリ 32,212 KB
実行使用メモリ 32,916 KB
最終ジャッジ日時 2024-07-02 22:09:48
合計ジャッジ時間 2,936 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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);
  echo $tmp;
  $array[] = $tmp;
}
$total = 0;
foreach ($array as $element){
  $total += $element;
}
$ans = ($total % $n) == 0 ? 'Yes' : 'No';
echo $ans;
0