結果
| 問題 | No.1622 三角形の面積 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-01-11 22:36:14 |
| 言語 | Rust (1.92.0 + proconio + num) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 411 bytes |
| 記録 | |
| コンパイル時間 | 28,052 ms |
| コンパイル使用メモリ | 411,576 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-01-11 22:36:43 |
| 合計ジャッジ時間 | 27,624 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 4 |
ソースコード
use proconio::{fastout, input};
#[fastout]
fn main() {
input! {
r: [u8],
}
println!("{}", output(solve(r)))
}
fn solve(r: Vec<u8>) -> Vec<f32> {
r.into_iter()
.map(|r| 1.299038105676657 * (r as u16).pow(2) as f32)
.collect()
}
fn output(ans: Vec<f32>) -> String {
ans.into_iter()
.map(|x| x.to_string())
.collect::<Vec<_>>()
.join("\n")
}