Task: | Tikut |
Sender: | Ez |
Submission time: | 2024-10-28 13:34:46 +0200 |
Language: | Rust (2021) |
Status: | COMPILE ERROR |
Compiler report
error[E0425]: cannot find value `a` in this scope --> input/code.rs:9:20 | 9 | println!("{}", a + b); | ^ help: a local variable with a similar name exists: `m` error[E0425]: cannot find value `b` in this scope --> input/code.rs:9:24 | 9 | println!("{}", a + b); | ^ help: a local variable with a similar name exists: `m` error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0425`.
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).unwrap(); let mut split = line.split_whitespace(); let n: i32 = split.next().unwrap().parse().unwrap(); let m: i32 = split.next().unwrap().parse().unwrap(); println!("{}", a + b); }