結果
問題 |
No.1131 Deviation Score
|
ユーザー |
![]() |
提出日時 | 2022-07-28 22:57:24 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 122 ms / 2,000 ms |
コード長 | 336 bytes |
コンパイル時間 | 1,060 ms |
コンパイル使用メモリ | 159,472 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-18 13:11:45 |
合計ジャッジ時間 | 3,235 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 21 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int x[n]; for (int i = 0; i < n; i++) { cin >> x[i]; } int total = 0; for (int i = 0; i < n; i++) { total += x[i]; } double ave = (double)total/(double)n; for (int i = 0; i < n; i++) { cout << int(50-(ave-x[i])/2) << endl; } return 0; }