結果
問題 |
No.98 円を描こう
|
ユーザー |
![]() |
提出日時 | 2022-12-05 01:25:08 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 405 bytes |
コンパイル時間 | 11,606 ms |
コンパイル使用メモリ | 407,380 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-12 01:17:10 |
合計ジャッジ時間 | 12,672 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 6 |
ソースコード
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(); let diameter = 2. * input[0].hypot(input[1]); if diameter.fract() == 0. { println!("{}", diameter.ceil() + 1.); } else { println!("{}", diameter.ceil()); } }