| Task: | Pizzat |
| Sender: | emmou |
| Submission time: | 2024-11-01 09:40:26 +0200 |
| Language: | Rust (2021) |
| Status: | COMPILE ERROR |
Compiler report
error[E0599]: no method named `unwap` found for enum `Result` in the current scope --> input/code.rs:7:32 | 7 | input.read_line(&mut line).unwap(); //what will the verdict be when it cannot compile? | ^^^^^ help: there is a method with a similar name: `unwrap` error: aborting due to previous error For more information about this error, try `rustc --explain E0599`.
Code
use std::io::{BufRead, BufReader};
fn main() {
let mut input = BufReader::new(std::io::stdin());
let mut line = "".to_string();
input.read_line(&mut line).unwap(); //what will the verdict be when it cannot compile?
let n: i32 = line[0..1].parse().expect("jaa");
let m: i32 = line[2..3].parse().expect("jaa");
let k: i32 = line[4..5].parse().expect("jaa");
let val = (m*k)/n;
print!("{} ", val);
if (m*k)%n==0 {
print!("{}", val)
} else {
print!("{}\n", val+1)
}
}
