結果

問題 No.1131 Deviation Score
ユーザー phsplsphspls
提出日時 2020-07-28 18:05:20
言語 Rust
(1.77.0)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 476 bytes
コンパイル時間 2,134 ms
コンパイル使用メモリ 133,532 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-10 12:20:01
合計ジャッジ時間 4,719 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
4,376 KB
testcase_01 AC 3 ms
4,376 KB
testcase_02 AC 108 ms
4,380 KB
testcase_03 AC 50 ms
4,376 KB
testcase_04 AC 101 ms
4,376 KB
testcase_05 AC 38 ms
4,376 KB
testcase_06 AC 105 ms
4,376 KB
testcase_07 AC 51 ms
4,376 KB
testcase_08 AC 94 ms
4,376 KB
testcase_09 AC 35 ms
4,376 KB
testcase_10 AC 89 ms
4,376 KB
testcase_11 AC 92 ms
4,376 KB
testcase_12 AC 82 ms
4,380 KB
testcase_13 AC 105 ms
4,380 KB
testcase_14 AC 23 ms
4,376 KB
testcase_15 AC 22 ms
4,380 KB
testcase_16 AC 95 ms
4,380 KB
testcase_17 AC 39 ms
4,380 KB
testcase_18 AC 122 ms
4,380 KB
testcase_19 AC 2 ms
4,380 KB
testcase_20 AC 1 ms
4,380 KB
testcase_21 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

fn main() {
    let mut n = String::new();
    std::io::stdin().read_line(&mut n).ok();
    let n: usize = n.trim().parse().unwrap();
    let mut x = String::new();
    std::io::stdin().read_line(&mut x).ok();
    let x: Vec<isize> = x.trim().split_whitespace().map(|s| s.parse().unwrap()).collect();
    let avg: f64 = x.iter().sum::<isize>() as f64 / n as f64;

    x.iter().for_each(|i| {
        println!("{}", (50.0 - (avg - *i as f64) / 2.0).floor() as isize);
    })
}
0