mirror of
https://github.com/tiennm99/claoj.git
synced 2026-10-11 03:13:12 +00:00
feat(rs): add hhcn
This commit is contained in:
1 parent
b919d17cea
commit
7e273c40fb
4 files changed
+32
No files matched your search
@@ -1,2 +1,4 @@
|
||||
.idea
|
||||
*.exe
|
||||
debug
|
||||
target
|
||||
Generated
+7
@@ -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"
|
||||
@@ -0,0 +1,8 @@
|
||||
[package]
|
||||
name = "claoj"
|
||||
version = "0.0.1"
|
||||
edition = "2024"
|
||||
|
||||
[[bin]]
|
||||
name = "hhcn"
|
||||
path = "hhcn.rs"
|
||||
+15
@@ -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);
|
||||
}
|
||||
Reference in new issue
Block a user