feat(rs): add hhcn

This commit is contained in:
tiennm99 committed 2025-11-29 00:25:50 +07:00
1 parent b919d17cea
commit 7e273c40fb
4 files changed
+32

No files matched your search

+2
View File
@@ -1,2 +1,4 @@
.idea
*.exe
debug
target
Generated
+7
View File
@@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "claoj"
version = "0.0.1"
+8
View File
@@ -0,0 +1,8 @@
[package]
name = "claoj"
version = "0.0.1"
edition = "2024"
[[bin]]
name = "hhcn"
path = "hhcn.rs"
+15
View File
@@ -0,0 +1,15 @@
use std::io::{self, BufRead};
fn main() {
let mut input = String::new();
io::stdin().lock().read_line(&mut input).unwrap();
let mut nums = input.split_whitespace().map(|x| x.parse::<f64>().unwrap());
let a = nums.next().unwrap();
let b = nums.next().unwrap();
let c = nums.next().unwrap();
let result = 4.0 * (a * b + b * c + c * a) / (a * b * c).sqrt();
println!("{}", result);
}