結果
| 問題 | No.735 接線 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-02-05 14:31:28 |
| 言語 | Rust (1.99.0 + proconio + num + itertools + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 48µs | |
| コード長 | 408 bytes |
| 記録 | |
| コンパイル時間 | 6,670 ms |
| コンパイル使用メモリ | 182,276 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-10-14 10:58:00 |
| 合計ジャッジ時間 | 8,728 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
fn main() {
let stdin = std::io::read_to_string(std::io::stdin()).unwrap();
let mut stdin = stdin.split_ascii_whitespace();
let r: f64 = stdin.next().unwrap().parse().unwrap();
let d: f64 = stdin.next().unwrap().parse().unwrap();
println!("{:>.07}", output(solve(r, d)));
}
fn solve(r: f64, d: f64) -> f64 {
(d.powi(2) - r.powi(2)).sqrt()
}
fn output(ans: f64) -> f64 {
ans
}