結果
問題 | No.275 中央値を求めよ |
ユーザー |
![]() |
提出日時 | 2019-02-25 16:56:56 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 283 bytes |
コンパイル時間 | 561 ms |
コンパイル使用メモリ | 54,136 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-26 08:26:21 |
合計ジャッジ時間 | 1,978 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 8 WA * 30 |
ソースコード
#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 / (double)N;std::cout << Avg << std::endl;return 0;}