結果

問題 No.9014 テストの合計点と平均点
ユーザー yutoyuto
提出日時 2023-07-26 02:20:10
言語 Rust
(1.77.0)
結果
WA  
実行時間 -
コード長 601 bytes
コンパイル時間 684 ms
コンパイル使用メモリ 155,800 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-10 16:28:40
合計ジャッジ時間 861 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

fn main() {
	// proconio使えないの厳しい...
    // ref: https://doc.rust-jp.rs/atcoder-rust-resources/#素早く書くことにはあまり向かない仕様
    let mut buf = String::new();
    std::io::stdin().read_line(&mut buf).unwrap();
    let mut iter = buf
        .trim()
        .split_terminator(',')
        .map(|c| c.parse::<i32>().unwrap());
    let (j, m, b) = (
        iter.next().unwrap(),
        iter.next().unwrap(),
        iter.next().unwrap(),
    );
    let t = j + m + b;
    let a = t / 3;
    println!("合計点:{}", t);
    println!("平均点:{:.1}", a);
}
0