CSES - Datatähti 2025 alku - Results
Submission details
Task:Tikut
Sender:Ez
Submission time:2024-10-28 13:37:25 +0200
Language:Rust (2021)
Status:COMPILE ERROR

Compiler report

error: invalid format string: expected `'}'`, found `';'`
  --> input/code.rs:10:16
   |
10 |     println!("{;?}", input);
   |               -^ expected `}` in format string
   |               |
   |               because of this opening brace
   |
   = note: if you intended to print `{`, you can escape it using `{{`

error: aborting due to previous error

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!("{}", m + n);
    println!("{;?}", input);
}