結果

問題 No.476 正しくない平均
ユーザー con
提出日時 2018-11-20 16:18:17
言語 Fortran
(gFortran 14.2.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 226 bytes
コンパイル時間 159 ms
コンパイル使用メモリ 32,000 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-24 15:33:50
合計ジャッジ時間 1,191 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

implicit none
integer(8) i,m,n,a,B
integer(8),allocatable :: x(:)
read(*,*) n,a
allocate (x(n))
read(*,*) (x(m),m=1,n)
B=0
do i=1,n
   B=B+x(i)
end do
if (B==(a*n)) then
    write(*,*) "YES"
else
    write(*,*) "NO"
end if
end
0