結果

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

ソースコード

diff #

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