結果

問題 No.172 UFOを捕まえろ
ユーザー cra77756176
提出日時 2022-12-06 02:20:13
言語 Rust
(1.83.0 + proconio)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 359 bytes
コンパイル時間 17,001 ms
コンパイル使用メモリ 380,560 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-12 21:43:36
合計ジャッジ時間 18,268 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

fn main() {
    let mut input = String::new();
    std::io::stdin().read_line(&mut input).ok();
    let input: Vec<f64> = input
        .split_whitespace()
        .map(|n| n.parse().unwrap())
        .collect();

    if let &[x, y, r] = &input[..] {
        let dist = 2f64.sqrt().mul_add(r, x.abs() + y.abs());

        println!("{}", dist.ceil());
    }
}
0