結果
| 問題 |
No.9014 テストの合計点と平均点
|
| ユーザー |
|
| 提出日時 | 2023-07-26 02:23:42 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 614 bytes |
| コンパイル時間 | 11,963 ms |
| コンパイル使用メモリ | 378,504 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-02 18:56:33 |
| 合計ジャッジ時間 | 12,113 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 3 |
ソースコード
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: f64 = t as f64 / 3.0;
println!("合計点:{}", t);
println!("平均点:{:.1}", a);
}