結果

問題 No.191 供託金
コンテスト
ユーザー taba
提出日時 2024-07-31 17:45:46
言語 Rust
(1.97.1 + proconio + num + itertools)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 1 ms / 5,000 ms
+ 26µs
コード長 258 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 7,829 ms
コンパイル使用メモリ 183,672 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2026-08-24 18:06:51
合計ジャッジ時間 2,891 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: unused imports: `BTreeSet`, `HashMap`, and `hash::Hash`
 --> src/main.rs:2:19
  |
2 |     collections::{BTreeSet, HashMap},
  |                   ^^^^^^^^  ^^^^^^^
3 |     hash::Hash,
  |     ^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default

ソースコード

diff #
raw source code

use std::{
    collections::{BTreeSet, HashMap},
    hash::Hash,
};

fn main() {
    proconio::input! {
        n: usize,
        c: [u64; n],
    }
    let sum = c.iter().sum::<u64>();
    println!("{}", c.iter().filter(|c| *c * 10 <= sum).count() * 30);
}
0