Notice
Recent Posts
Recent Comments
Link
«   2024/10   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
Archives
Today
Total
관리 메뉴

아모에요

[BOJ/백준][Rust] 1008 A/B 본문

Study/PS

[BOJ/백준][Rust] 1008 A/B

dys4nt 2023. 6. 18. 14:49

f32로 제출하면 오차범위에 의해서 틀렸다고 채점된다.

1
2
3
4
5
6
7
8
9
10
use std::io;
 
fn main(){
    let mut s = String::new();
    io::stdin().read_line(&mut s).unwrap();
    let li: Vec<&str> = s.split_whitespace().collect();
    let a = li[0].parse::<f64>().unwrap();
    let b = li[1].parse::<f64>().unwrap();
    println!("{}",a/b)
}
cs

'Study > PS' 카테고리의 다른 글

[BOJ/백준][Rust] 1001 A-B  (0) 2023.06.18
[BOJ/백준][Rust] 1000 A+B  (0) 2023.06.18
[BOJ/백준] 1956 - 운동  (0) 2023.06.11