結果
| 問題 | No.1487 ぺんぎんさんかっけー |
| コンテスト | |
| ユーザー |
Strorkis
|
| 提出日時 | 2021-04-23 22:18:54 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 634 bytes |
| 記録 | |
| コンパイル時間 | 12,567 ms |
| コンパイル使用メモリ | 406,248 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-04 08:13:36 |
| 合計ジャッジ時間 | 13,988 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 37 |
ソースコード
fn main() {
let ref mut buf = String::new();
std::io::Read::read_to_string(&mut std::io::stdin(), buf).ok();
let mut iter = buf.split_whitespace();
macro_rules! scan {
([$t:tt; $n:expr]) => ((0..$n).map(|_| scan!($t)).collect::<Vec<_>>());
(($($t:tt),*)) => (($(scan!($t)),*));
(Usize1) => (scan!(usize) - 1);
(Bytes) => (scan!(String).into_bytes());
($t:ty) => (iter.next().unwrap().parse::<$t>().unwrap());
}
let (a, b, c) = scan!((f64, f64, f64));
let s = (a + b + c) * 0.5;
let s = (s * (s - a) * (s - b) * (s - c)).sqrt();
println!("{}", s * 0.25);
}
Strorkis