結果

問題 No.275 中央値を求めよ
ユーザー yuasa0000
提出日時 2019-02-25 16:55:03
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 328 bytes
コンパイル時間 366 ms
コンパイル使用メモリ 54,492 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-26 08:24:08
合計ジャッジ時間 1,471 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 6 WA * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
int main() {
    int N;
    std::cin >> N;
    int* A = new int[N];
    for(int i = 0;i < N;i++){
        std::cin >> A[i];
    }
    
    int Sum = 0;
    for(int i = 0;i < N;i++){
        Sum+=A[i];
    }
    
    double Avg = (double)(Sum / N);
    
    std::cout << Avg << std::endl;
    
    return 0;
}
0